using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace YBEE.EQM.Core;

/// <summary>
/// 抽样方案学生
/// </summary>
[Comment("抽样方案学生")]
public class ExamSampleStudent : IEntity
{
    /// <summary>
    /// 主键
    /// </summary>
    [Comment("主键")]
    [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public long Id { get; set; }
    /// <summary>
    /// 抽样方案ID
    /// </summary>
    [Comment("抽样方案ID")]
    [Required]
    public int ExamSampleId { get; set; }
    /// <summary>
    /// 监测样本学生ID
    /// </summary>
    [Comment("监测样本学生ID")]
    [Required]
    public int ExamStudentId { get; set; }
    /// <summary>
    /// 监测号
    /// </summary>
    [Comment("监测号")]
    [Required, StringLength(20)]
    public string ExamNumber { get; set; } = "";
    /// <summary>
    /// 监测抽样类型
    /// </summary>
    [Comment("监测抽样类型")]
    [Required, Column(TypeName = "smallint")]
    public ExamSampleType ExamSampleType { get; set; } = ExamSampleType.SCHOOL;
}
