using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace OnlineAssessment.Domain.ViewModels
{
    public class ExamViewAllPagedModel
    {
        public int total_count { get; set; }
        public int total_pages { get; set; }
        public int page_index { get; set; }
        public bool next { get; set; }
        public bool previous { get; set; }
        public List<ExamViewAllModel> exams { get; set; }
    }

    public class ExamViewDraftPagedModel
    {
        public int total_count { get; set; }
        public int total_pages { get; set; }
        public int page_index { get; set; }
        public bool next { get; set; }
        public bool previous { get; set; }
        public List<ExamViewDraftModel> exams { get; set; }
    }


    public class ExamViewModel
    {
        public int id { get; set; }
        public int institute_id { get; set; }
        public int? author_id { get; set; }
        public int examtype_id { get; set; }
        public int? language_id { get; set; }
        public string name { get; set; }
        public string instruction { get; set; }
        public string image { get; set; }
        public string exam_status { get; set; }
        public DateTime? start_date { get; set; }
        public DateTime? end_date { get; set; }
        public double duration_seconds { get; set; }
        public short? attempts_allowed { get; set; }
        public bool? isActive { get; set; }
        public DateTime? created_on { get; set; }
        public DateTime? updated_on { get; set; }
        public List<ExamSectionViewModel> sections { get; set; }
    }



    public class ExamViewAllModel
    {
        public int id { get; set; }
        public int institute_id { get; set; }
        public int? author_id { get; set; }
        public string author_name { get; set; }
        public string name { get; set; }
        public string image { get; set; }
        public int examtype_id { get; set; }
        public string language_code { get; set; }
        public string need_assessment { get; set; }
        public string exam_status { get; set; }
        public short? complexity { get; set; }
        public DateTime? start_date { get; set; }
        public DateTime? end_date { get; set; }
        public int sections_count { get; set; }
        public string section_name { get; set; }
        public double? total_marks { get; set; }
        public int total_questions { get; set; }
        public short? attempts_allowed { get; set; }
        public short? attempts_taken { get; set; }
        public int? exam_duration { get; set; }
        public DateTime? created_on { get; set; }
        public DateTime? updated_on { get; set; }
        public bool? isActive { get; set; }
    }

    public class ExamViewDraftModel
    {
        public int id { get; set; }
        public int institute_id { get; set; }
        public string name { get; set; }
        public string image { get; set; }
        public int? author_id { get; set; }
        public string author_name { get; set; }
        public int examtype_id { get; set; }
        public int? language_id { get; set; }
        public string exam_status { get; set; }
        public int sections_count { get; set; }
        public string sections_status { get; set; }
        public short complexity { get; set; }
        public DateTime? created_on { get; set; }
        public DateTime? updated_on { get; set; }
        public bool? isActive { get; set; }
    }



    public class SectionQuestionsPagedModel
    {
        public int total_count { get; set; }
        public int total_pages { get; set; }
        public int page_index { get; set; }
        public bool next { get; set; }
        public bool previous { get; set; }
        public List<SectionQuestionDetails> questions { get; set; }
    }

    public class SectionQuestionDetails
    {
        public int id { get; set; }
        public string type { get; set; }
        public string type_name { get; set; }
        public string status { get; set; }
        public string title { get; set; }
        public short? complexity_code { get; set; }
        public string image { get; set; }
        public string source { get; set; }
        public int author { get; set; }
        public bool? isBookmarked { get; set; }
        public bool? isActive { get; set; }
        public int topic_id { get; set; }
        public string topic_name { get; set; }
        public double? correct_mark { get; set; }
        public double? incorrect_mark { get; set; }
        public int? sequence { get; set; }


    }


    public class ExamAddModel
    {
        [Required]
        public string name { get; set; }

        public int examtype_id { get; set; }

        public string image { get; set; }
    }

    public class ExamEditModel
    {
        [Key]
        public int id { get; set; }
        public int examtype_id { get; set; }

        public string name { get; set; }

        public string image { get; set; }
    }

    public class ExamPublishModel
    {
        public string instruction { get; set; }

        [Required]
        public DateTime start_date { get; set; }
        [Required]
        public DateTime end_date { get; set; }
        [Required]
        public short attempts_allowed { get; set; }
        [Required]
        public int exam_duration { get; set; }

        
        //public UserGroupsList batch_list { get; set; }
        // Atleast one section with atleast one question, Section status is submit, Exam status auto update to Pub
    }

    public class ExamSectionAddModel
    {
        [Required]
        public int subject_id { get; set; }
        [Required]
        public int author_id { get; set; }

        [Required]
        public short? section_duration { get; set; }
    }


    public class IntegerSectionList
    {
        [Required]
        public List<int> idList { get; set; }
    }

    /*
        public class ExamSectionViewModel
        {
            public int id { get; set; }

            public int exam_id { get; set; }

            public int subject_id { get; set; }
            public string subject_name { get; set; }
            public int author_id { get; set; }
            public string author_name { get; set; }
            public short? section_sequence { get; set; }
            public short? section_duration { get; set; }
            public bool? isActive { get; set; }
            public List<QuestionMarkWeightViewModel> questions { get; set; }
        }
    */
    public class ExamSectionViewModel
    {
        public int id { get; set; }
        public int subject_id { get; set; }
        public string subject_name { get; set; }
        public string section_state { get; set; }
        public short? section_sequence { get; set; }
        public short? section_duration { get; set; }
        public int total_questions { get; set; }
        public double total_marks { get; set; }
    }



    public class ExamSectionEditModel
    {
        [Key]
        public int id { get; set; }
        public int subject_id { get; set; }
        public int author_id { get; set; }
        public bool? isActive { get; set; }
    }


    public class QuestionMarkWeight
    {
        public int question_id { get; set; }
        public short correct_mark { get; set; }
        public short negative_mark { get; set; }
    }

    public class QuestionMarkWeightViewModel
    {
        public int id { get; set; }
        public string type { get; set; }
        public string status { get; set; }
        public string title { get; set; }
        public short? complexity_code { get; set; }
        public string source { get; set; }
        public int author { get; set; }
        public bool? isBookmarked { get; set; }
        public bool? isActive { get; set; }
        public int topic_id { get; set; }
        public string topic_name { get; set; }
        public int subtopic_id { get; set; }
        public string subtopic_name { get; set; }
        public int? question_sequence { get; set; }
        public double? correct_mark { get; set; }
        public double? negative_mark { get; set; }


    }

    public class QuestionMarkWeightEditModel
    {
        public int question_id { get; set; }

        public int? question_sequence { get; set; }

        public short? correct_mark { get; set; }
        public short? negative_mark { get; set; }
    }

    public class QuestionsList
    {
        [Required]
        public List<int> idList { get; set; }

    }

    public class UsersList
    {
        [Required]
        public List<int> idList { get; set; }

    }


    public class QuestionMarksList
    {
        [Required]
        public List<QuestionMarks> qnsMarkList { get; set; }
    }

    public class QuestionMarks
    {
        [Required]
        public int id { get; set; }
        [Required]
        public double? correct_mark { get; set; }
        [Required]
        public double? negative_mark { get; set; }
    }




    public class QuestionsMarkList
    {
        [Required]
        public List<QuestionMarkWeightEditModel> idList { get; set; }
    }

    public class ExamSectionsList
    {
        [Required]
        public List<int> idList { get; set; }
    }

    public class UserGroupsList
    {
        
        public List<int> idList { get; set; }
    }

    public class SubscriptionType
    {
        [Required]
        public short type { get; set; }
    }
}
