using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace YBEE.EQM.Core;
///
/// 监测计划
///
[Comment("监测计划")]
public partial class ExamPlan : DEntityBase
{
///
/// 学段
///
[Comment("学段")]
[Required, Column(TypeName = "smallint")]
public EducationStage EducationStage { get; set; }
///
/// 学制
///
[Comment("学制")]
[Required]
public short EducationYears { get; set; }
///
/// 学期ID
///
[Comment("学期ID")]
[Required]
public short SemesterId { get; set; }
///
/// 序,同一学段、学期、监测类型、监测期间从1开始计数
///
[Comment("序,同一学段、学期、监测类型、监测期间从1开始计数")]
[Required]
public short Sequence { get; set; } = 1;
///
/// 名称
///
[Comment("名称")]
[Required, StringLength(100)]
public string Name { get; set; }
///
/// 全称
///
[Comment("全称")]
[Required, StringLength(200)]
public string FullName { get; set; }
///
/// 简称
///
[Comment("简称")]
[Required, StringLength(50)]
public string ShortName { get; set; }
///
/// 备注
///
[Comment("备注")]
[StringLength(200)]
public string Remark { get; set; } = "";
///
/// 监测配置
///
[Comment("监测配置")]
[Required, Column(TypeName = "json")]
public string Config { get; set; } = new { }.ToJson();
///
/// 是否已固定监测抽样方案
///
[Comment("是否已固定监测抽样方案")]
[Required]
public bool IsFixedExamSample { get; set; } = false;
///
/// 状态
///
[Comment("状态")]
[Required]
public ExamStatus Status { get; set; } = ExamStatus.READY;
///
/// 开始时间
///
[Comment("开始时间")]
public DateTime? BeginTime { get; set; }
///
/// 结束时间
///
[Comment("结束时间")]
public DateTime? EndTime { get; set; }
///
/// 一对一引用(学期)
///
public virtual Semester Semester { get; set; }
///
/// 一对多引用(监测机构)
///
public ICollection ExamOrgs { get; } = new List();
///
/// 一对多引用(监测年级)
///
public ICollection ExamGrades { get; } = new List();
///
/// 一对多引用(监测上报类型)
///
public ICollection ExamDataReports { get; } = new List();
}