using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using StaffManagement.Database.StaticData;

namespace StaffManagement.Database.Tables
{
    /// <summary>
    /// 人员基本信息
    /// </summary>
    [Table("Person")]
    public class Person
    {
        [Key]
        public int Id { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [MaxLength(10)]
        public string Name { get; set; } = null;
        /// <summary>
        /// 身份证号码
        /// </summary>
        [MaxLength(20)]
        public string CardNo { get; set; } = "";
        /// <summary>
        /// 性别
        /// </summary>
        public GenderDefinition Gender { get; set; } = GenderDefinition.Unknown;
        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTimeOffset Birthday { get; set; } = DateTimeOffset.MinValue;
        /// <summary>
        /// 电话号码
        /// </summary>
        [MaxLength(200)]
        public string PhoneNo { get; set; } = "";
        /// <summary>
        /// 婚史
        /// </summary>
        public MarriageDefinition Marriage { get; set; } = MarriageDefinition.Unknown;
        /// <summary>
        /// 学历
        /// </summary>
        public EducationDefinition Education { get; set; } = EducationDefinition.Unknown;
        /// <summary>
        /// 记录状态
        /// </summary>
        public int Status { get; set; } = 0;
    }
}
