using Furion.JsonSerialization; using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace YBEE.EQM.Core; /// /// 监测科目 /// [Comment("监测科目")] public class ExamCourse : 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 short CourseId { get; set; } /// /// 总分 /// [Comment("总分")] [Required] public decimal TotalScore { get; set; } = 100; /// /// 分数分段类型 /// public ExamScoreRangeType ExamScoreRangeType { get; set; } = ExamScoreRangeType.EXAM_100; /// /// 成绩上报模板配置信息 /// [Comment("模板配置信息")] [Required, Column(TypeName = "json")] public string ScoreReportConfig { get; set; } = JSON.Serialize(new ExamCourseScoreReportConfig()); /// /// 一对一引用(监测年级) /// public virtual ExamGrade ExamGrade { get; set; } /// /// 一对一引用(科目) /// public virtual Course Course { get; set; } }