using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace YBEE.EQM.Core;
///
/// 试卷
///
[Comment("试卷")]
public class ExamPaper : DEntityBase
{
///
/// 监测计划ID
///
[Comment("监测计划ID")]
[Required]
public int ExamPlanId { get; set; }
///
/// 监测年级ID
///
[Comment("监测年级ID")]
[Required]
public int ExamGradeId { get; set; }
///
/// 年级ID
///
[Comment("年级ID")]
[Required]
public short GradeId { get; set; }
///
/// 监测科目ID
///
[Comment("监测科目ID")]
[Required]
public int ExamCourseId { get; set; }
///
/// 科目ID
///
[Comment("科目ID")]
[Required]
public short CourseId { get; set; }
///
/// 名称
///
[Comment("名称")]
[Required]
public string Name { get; set; }
///
/// 总分
///
[Comment("总分")]
[Required, Column(TypeName = "decimal(10, 2)")]
public decimal Score { get; set; } = 0;
///
/// 备注
///
[Comment("备注")]
[StringLength(200)]
public string Remark { get; set; } = "";
///
/// 问题
///
[Comment("问题")]
[StringLength(4000)]
public string Questions { get; set; } = "";
///
/// 建议
///
[Comment("建议")]
[StringLength(4000)]
public string Suggestions { get; set; } = "";
///
/// 双向细目表编制状态
///
[Comment("状态")]
[Required, Column(TypeName = "smallint")]
public AuditStatus TwclStatus { get; set; } = AuditStatus.UNSUBMIT;
///
/// 双向细目表编制审核记录
///
[Comment("双向细目表编制审核记录")]
[Required, Column(TypeName = "json")]
public string TwclAudits { get; set; } = "[]";
///
/// 双向细目表编制人用户ID
///
[Comment("双向细目表编制人用户ID")]
public int? TwclSysUserId { get; set; }
///
/// 问题建议撰写状态
///
[Comment("问题建议撰写状态")]
[Required, Column(TypeName = "smallint")]
public AuditStatus SuggestionStatus { get; set; } = AuditStatus.UNSUBMIT;
///
/// 问题建议撰写审核记录
///
[Comment("问题建议撰写审核记录")]
[Required, Column(TypeName = "json")]
public string SuggestionAudits { get; set; } = "[]";
///
/// 问题建议撰写人用户ID
///
[Comment("问题建议撰写人用户ID")]
public int? SuggestionSysUserId { get; set; }
///
/// 一对一引用(监测信息)
///
public virtual ExamPlan ExamPlan { get; set; }
///
/// 一对一引用(年级)
///
public virtual Grade Grade { get; set; }
///
/// 一对一引用(科目)
///
public virtual Course Course { get; set; }
///
/// 一对一引用(双向细目表编制人)
///
public virtual SysUser TwclSysUser { get; set; }
///
/// 一对一引用(问题建议撰写人)
///
public virtual SysUser SuggestionSysUser { get; set; }
///
/// 一对多引用(试卷小题)
///
public ICollection ExamPaperQuestionMinors { get; } = new List();
}