using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 添加机构输入参数
/// </summary>
public class AddSysOrgInput
{
    /// <summary>
    /// 父机构ID
    /// </summary>
    [Required]
    public short Pid { get; set; } = 0;
    /// <summary>
    /// 机构类型
    /// </summary>
    [Required]
    public OrgType OrgType { get; set; }
    /// <summary>
    /// 办学性质
    /// </summary>
    [Required]
    public OrgFundSource OrgFundSource { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 城乡类型
    /// </summary>
    [Required]
    public UrbanRuralType UrbanRuralType { get; set; }
    /// <summary>
    /// 所属学区ID（机构ID）
    /// </summary>
    public short? SchoolDistrictId { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required, StringLength(100)]
    public string Name { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required, StringLength(200)]
    public string FullName { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required, StringLength(50)]
    public string ShortName { get; set; }
    /// <summary>
    /// 简称2
    /// </summary>
    [StringLength(50)]
    public string ShortName2 { get; set; } = "";
    /// <summary>
    /// 编码
    /// </summary>
    [Required, StringLength(20)]
    public string Code { get; set; }
    /// <summary>
    /// 带前缀唯一代码
    /// </summary>
    [Required, StringLength(20)]
    public string UniqueCode { get; set; }
    /// <summary>
    /// 经度
    /// </summary>
    public decimal Longitude { get; set; } = 0;
    /// <summary>
    /// 纬度
    /// </summary>
    public decimal Latitude { get; set; } = 0;
    /// <summary>
    /// 地址
    /// </summary>
    public string Address { get; set; } = "";
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; } = "";
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public CommonStatus Status { get; set; }
}

/// <summary>
/// 更新机构输入参数
/// </summary>
public class UpdateSysOrgInput : AddSysOrgInput
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public short Id { get; set; }
    /// <summary>
    /// 排序
    /// </summary>
    [Required]
    public int Sort { get; set; }
}

/// <summary>
/// 查询机构输入参数
/// </summary>
public class QuerySysOrgInput
{
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 编码
    /// </summary>

    public string Code { get; set; }
    /// <summary>
    /// 机构类型
    /// </summary>
    public OrgType? OrgType { get; set; }
    /// <summary>
    /// 办学性质
    /// </summary>
    public OrgFundSource? OrgFundSource { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    public EducationStage? EducationStage { get; set; }
    /// <summary>
    /// 城乡类型
    /// </summary>
    public UrbanRuralType? UrbanRuralType { get; set; }
    /// <summary>
    /// 所属学区ID（机构ID）
    /// </summary>
    public short? SchoolDistrictId { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    public CommonStatus? Status { get; set; }
}

/// <summary>
/// 分页查询机构输入参数
/// </summary>
public class SysOrgPageInput : PageInputBase
{
    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 编码
    /// </summary>

    public string Code { get; set; }
    /// <summary>
    /// 机构类型
    /// </summary>
    public OrgType? OrgType { get; set; }
    /// <summary>
    /// 办学性质
    /// </summary>
    public OrgFundSource? OrgFundSource { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    public EducationStage? EducationStage { get; set; }
    /// <summary>
    /// 城乡类型
    /// </summary>
    public UrbanRuralType? UrbanRuralType { get; set; }
    /// <summary>
    /// 所属学区ID（机构ID）
    /// </summary>
    public short? SchoolDistrictId { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    public CommonStatus? Status { get; set; }
}