using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 添加单个学校班级输入参数
/// </summary>
public class AddSchoolClassInput
{
    /// <summary>
    /// 学校ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 校区ID
    /// </summary>
    public short? SysOrgBranchId { get; set; }
    /// <summary>
    /// 入学年份（级）
    /// </summary>
    [Required]
    public short GradeBeginYear { get; set; }
    /// <summary>
    /// 毕业年份（级）
    /// </summary>
    [Required]
    public short GradeEndYear { get; set; }
    /// <summary>
    /// 学制
    /// </summary>
    [Required]
    public short EducationYears { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }

    /// <summary>
    /// 班号
    /// </summary>
    [Required]
    public short ClassNumber { get; set; }
    /// <summary>
    /// 名称：入学年份+级+班号+班，如2025级1班
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Name { get; set; }
    /// <summary>
    /// 全称：学段名+入学年份+级+班号+班，如小学2025级1班
    /// </summary>
    [Required]
    [StringLength(200)]
    public string FullName { get; set; }
    /// <summary>
    /// 简称：班号+班，如1班
    /// </summary>
    [Required]
    [StringLength(50)]
    public string ShortName { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    [StringLength(200)]
    public string Remark { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public CommonStatus Status { get; set; }
}

/// <summary>
/// 批量添加学校班级输入参数
/// </summary>
public class BatchAddSchoolClassInput
{
    /// <summary>
    /// 学校ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 校区ID
    /// </summary>
    public short? SysOrgBranchId { get; set; }
    /// <summary>
    /// 入学年份（级）
    /// </summary>
    [Required]
    public short GradeBeginYear { get; set; }
    /// <summary>
    /// 毕业年份（级）
    /// </summary>
    [Required]
    public short GradeEndYear { get; set; }
    /// <summary>
    /// 学制
    /// </summary>
    [Required]
    public short EducationYears { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 添加班级数量
    /// </summary>
    [Required, Range(1, 50, ErrorMessage = "班级数量限制为1至50")]
    public short ClassCount { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public CommonStatus Status { get; set; }
}

/// <summary>
/// 分页查询班级输入参数
/// </summary>
public class SchoolClassPageInput : PageInputBase
{
    /// <summary>
    /// 学校ID
    /// </summary>
    public short? SysOrgId { get; set; }
    /// <summary>
    /// 校区ID
    /// </summary>
    public short? SysOrgBranchId { get; set; }
    /// <summary>
    /// 入学年份（级）
    /// </summary>
    public short? GradeBeginYear { get; set; }
    /// <summary>
    /// 班号
    /// </summary>
    public short? ClassNumber { get; set; }
    /// <summary>
    /// 班名
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    public CommonStatus? Status { get; set; }
}

/// <summary>
/// 导入批量生成班级输入参数
/// </summary>
public class ImportSchoolClassInput
{
    /// <summary>
    /// 学校ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 校区ID
    /// </summary>
    public short? SysOrgBranchId { get; set; }
    /// <summary>
    /// 监测年级
    /// </summary>
    [Required]
    public ExamGradeOutput ExamGrade { get; set; }
    /// <summary>
    /// 班号列表
    /// </summary>
    [Required]
    public List<short> ClassNumberList { get; set; }
}

/// <summary>
/// 批量插入输入参数
/// </summary>
public class BatchInsertSchoolClassInput: AddSchoolClassInput
{
    /// <summary>
    /// 主键
    /// </summary>
    public long Id { get; set;}
}