using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 科目极简输出参数
/// </summary>
public class CourseMiniOutput
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public short Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }
}

/// <summary>
/// 科目简要输出参数
/// </summary>
public class CourseLiteOutput
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public short Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }
    /// <summary>
    /// 别称
    /// </summary>
    public string NickName { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public CommonStatus Status { get; set; }
}

/// <summary>
/// 科目完整输出参数
/// </summary>
public class CourseOutput : DEntityOutput<short>
{
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }
    /// <summary>
    /// 别称
    /// </summary>
    public string NickName { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}

/// <summary>
/// 高中科目对象
/// </summary>
public class NceeCourseDto
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public short Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }
    /// <summary>
    /// 别称
    /// </summary>
    public string NickName { get; set; }
    /// <summary>
    /// 序
    /// </summary>
    public short Sequence { get; set; }

    /// <summary>
    /// 是否跳过
    /// </summary>
    /// <param name="directionCourseId">首选科目ID</param>
    /// <returns></returns>
    public bool IsSkip(short directionCourseId)
    {
        if (Id == 4 && directionCourseId == 8) { return true; }
        if (Id == 8 && directionCourseId == 4) { return true; }
        return false;
    }
}