using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;

namespace YBEE.EQM.Core;

/// <summary>
/// 校考成绩上报文件
/// </summary>
public class ExamOrgScoreReport : DEntityBase
{
    /// <summary>
    /// 监测机构ID
    /// </summary>
    [Comment("监测机构ID")]
    [Required]
    public int ExamOrgId { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Comment("监测计划ID")]
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 监测机构ID
    /// </summary>
    [Comment("监测机构ID")]
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 监测年级ID
    /// </summary>
    [Comment("监测年级ID")]
    [Required]
    public int ExamGradeId { get; set; }
    /// <summary>
    /// 年级ID
    /// </summary>
    [Comment("年级ID")]
    [Required]
    public short GradeId { get; set; }
    /// <summary>
    /// 科目ID
    /// </summary>
    [Comment("科目ID")]
    [Required]
    public short CourseId { get; set; }

    /// <summary>
    /// 数据行
    /// </summary>
    [Comment("数据行")]
    [Required]
    public string DataRows { get; set; } = "[]";

    /// <summary>
    /// 文件名
    /// </summary>
    [Comment("文件名")]
    [Required, StringLength(200)]
    public string FileName { get; set; }
    /// <summary>
    /// 文件路径
    /// </summary>
    [Comment("文件路径")]
    [Required, StringLength(300)]
    public string FilePath { get; set; }
    /// <summary>
    /// 扩展名
    /// </summary>
    [Comment("扩展名")]
    [Required, StringLength(50)]
    public string FileExtName { get; set; }
    /// <summary>
    /// 文件大小
    /// </summary>
    [Comment("文件大小")]
    [Required]
    public long FileSize { get; set; } = 0;


    /// <summary>
    /// 一对一引用（监测年级）
    /// </summary>
    public virtual ExamGrade ExamGrade { get; set; }
    /// <summary>
    /// 一对一引用（科目）
    /// </summary>
    public virtual Course Course { get; set; }
}
