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

namespace YBEE.EQM.Core;

/// <summary>
/// 监测教师
/// </summary>
[Comment("监测教师")]
public class ExamTeacher : DEntityBase
{
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Comment("监测计划ID")]
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    [Comment("机构ID")]
    [Required]
    public short SysOrgId { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    [Comment("姓名")]
    [Required, StringLength(100)]
    public string Name { get; set; }
    /// <summary>
    /// 学校职位ID
    /// </summary>
    [Comment("学校职位ID")]
    [Required, Column(TypeName = "smallint")]
    public SchoolJobTitle SchoolJobTitle { get; set; } = SchoolJobTitle.TEACHER;
    /// <summary>
    /// 证件类型
    /// </summary>
    [Comment("证件类型")]
    [Required, Column(TypeName = "smallint")]
    public CertificateType CertificateType { get; set; } = CertificateType.NONE;
    /// <summary>
    /// 证件号码
    /// </summary>
    [Comment("证件号码")]
    [StringLength(50)]
    public string IdNumber { get; set; } = "";
    /// <summary>
    /// 出生日期
    /// </summary>
    [Comment("出生日期")]
    public DateTime? BirthDate { get; set; }
    /// <summary>
    /// 性别
    /// </summary>
    [Comment("性别")]
    [Required, Column(TypeName = "smallint")]
    public Gender Gender { get; set; } = Gender.UNKNOWN;
    /// <summary>
    /// 手机号码
    /// </summary>
    [Comment("手机号码")]
    [StringLength(50)]
    public string Mobile { get; set; } = "";
    /// <summary>
    /// 电子邮箱
    /// </summary>
    [Comment("电子邮箱")]
    [StringLength(200)]
    public string Email { get; set; } = "";
    /// <summary>
    /// 备注
    /// </summary>
    [Comment("备注")]
    [StringLength(200)]
    public string Remark { get; set; }

    /// <summary>
    /// 一对一引用（机构）
    /// </summary>
    public virtual SysOrg SysOrg { get; set; }
}
