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

namespace YBEE.EQM.Core;

/// <summary>
/// 人员
/// </summary>
[Comment("人员")]
[Table("base_person")]
public partial class Person : DEntityBase
{
    /// <summary>
    /// 姓名
    /// </summary>
    [Comment("姓名")]
    [Required, StringLength(100)]
    public string Name { get; set; }
    /// <summary>
    /// 曾用名
    /// </summary>
    [Comment("曾用名")]
    [StringLength(100)]
    public string FormerName { get; set; }
    /// <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; } = "";
}
