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

namespace YBEE.EQM.Core;

/// <summary>
/// 高中成绩
/// </summary>
public class NceeScore : IEntity
{
    /// <summary>
    /// 主键
    /// </summary>
    [Comment("主键")]
    [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
    public long Id { get; set; }
    /// <summary>
    /// 高中分析计划ID
    /// </summary>
    [Comment("高中分析计划ID")]
    [Required]
    public int NceePlanId { get; set; }
    /// <summary>
    /// 高中学生ID
    /// </summary>
    [Comment("高中学生ID")]
    [Required]
    public long NceeStudentId { get; set; }
    /// <summary>
    /// 科目ID
    /// </summary>
    [Comment("科目ID")]
    [Required]
    public short CourseId { get; set; }
    /// <summary>
    /// 原始分
    /// </summary>
    [Comment("原始分")]
    [Required, Column(TypeName = "decimal(10, 2)")]
    public decimal Score { get; set; } = 0;
    /// <summary>
    /// 赋分
    /// </summary>
    [Comment("赋分")]
    [Required, Column(TypeName = "decimal(10, 2)")]
    public decimal ScoreX { get; set; } = 0;

    /// <summary>
    /// 转换等级ID
    /// </summary>
    [Comment("转换等级ID")]
    public short? NceeConvertGradeId { get; set; }
    /// <summary>
    /// 转换等级名称
    /// </summary>
    [Comment("转换等级名称")]
    public string NceeConvertGradeName { get; set; }

    /// <summary>
    /// 一对一引用（高中学生）
    /// </summary>
    public virtual NceeStudent NceeStudent { get; set; }
}
