practicekea_backend/microservices/_layers/domain/ViewModels/Question.cs

184 lines
4.8 KiB
C#
Raw Normal View History

2024-12-02 13:24:34 +00:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace OnlineAssessment.Domain.ViewModels
{
public class QuestionViewAllPagedModel
{
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<QuestionViewAllModel> questions { get; set; }
}
public class QuestionViewModel
{
public int id { get; set; }
public string type { get; set; }
public string type_name { get; set; }
public string status { get; set; }
public List<int?> languages_available { get; set; }
public string title { get; set; }
public List<QuestionOptionViewModel> options { get; set; }
public string answer_explanation { get; set; }
public short? complexity_code { get; set; }
public string source { get; set; }
public int author_id { get; set; }
public string author_name { get; set; }
public bool? isBookmarked { get; set; }
public bool? isActive { get; set; }
public int subject_id { get; set; }
public string subject_name { get; set; }
public int topic_id { get; set; }
public string topic_name { get; set; }
public List<TagViewModel> tags { get; set; }
public DateTime? last_updated { get; set; }
}
public class QuestionViewAllModel
{
public int id { get; set; }
public string type { get; set; }
public string type_name { get; set; }
public string status { get; set; }
public List<int?> languages_available { 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 int topic_id { get; set; }
public string topic_name { get; set; }
public bool? isActive { get; set; }
}
public class IDList
{
public int id { get; set; }
}
public class QuestionCloneModel
{
[Required]
public string language_code { get; set; }
[Required]
public string title { get; set; }
public string answer_explanation { get; set; }
public List<QuestionOptionCloneModel> options { get; set; }
}
public class QuestionAddModel
{
[Required]
public string type { get; set; }
[Required]
public int topic_id { get; set; }
[Required]
public int complexity_code { get; set; }
[Required]
[StringLength(10)]
public string status { get; set; }
[Required]
public string title { get; set; }
public string description { get; set; }
public string answer_explanation { get; set; }
public string source { get; set; }
public IntegerList tags { get; set; }
public List<QuestionOptionAddModel> options { get; set; }
}
public class QuestionBulkAddModel
{
public List<QuestionAddModel> questions { get; set; }
}
public class QuestionEditModel
{
[Key]
public int id { get; set; }
public int author_id { get; set; }
public string title { get; set; }
public string answer_explanation { get; set; }
public int complexity_code { get; set; }
public string source { get; set; }
[Required]
[StringLength(10)]
public string status { get; set; }
public List<QuestionOptionEditModel> options { get; set; }
}
public class QuestionOptionAddModel
{
[Required]
public string text { get; set; }
public bool isCorrect { get; set; }
}
public class QuestionOptionCloneModel
{
[Required]
public int id { get; set; }
[Required]
public string text { get; set; }
}
public class QuestionOptionEditModel : QuestionOptionAddModel
{
[Key]
public int id { get; set; }
}
public class QuestionOptionViewModel
{
public int id { get; set; }
public string text { get; set; }
public bool? isCorrect { get; set; }
}
public class IntegerList
{
[Required]
public List<int> IdList { get; set; }
}
public class BookmarkList
{
[Required]
public List<int> IdList { get; set; }
public bool isBookmark { get; set; }
}
public class QuestionSubCategory
{
public int Id { get; set; }
public int QuestionId { get; set; }
public int SubCategoryId { get; set; }
}
}