using Dlhis.Entity.Basic.Enums;
using Kurisu.AspNetCore.DataAccess.SqlSugar;
using Kurisu.AspNetCore.DataAccess.SqlSugar.Attributes;
using Mapster;
using SqlSugar;
using SqlSugar.DbConvert;
namespace Dlhis.Entity.Basic.Entity;
///
/// 用户档案
///
[SugarTable(TableName = "Gainfo", TableDescription = "档案表")]
public class GainfoEntity : SugarBaseEntity
{
///
/// 档案号
///
[SugarColumn(ColumnDescription = "档案号", UniqueGroupNameList = new[] { "idx_Gainfo_No" })]
public string No { get; set; }
///
/// 内部编号
///
[SugarColumn(IsNullable = true, ColumnDescription = "内部编号")]
public string InternalNo { get; set; }
///
/// 人员类型
///
[AdaptIgnore(MemberSide.Destination)]
[SugarColumn(IsNullable = false, ColumnDescription = "人员类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public GainfoUserTypeEnumType Type { get; set; }
///
/// 人员来源
///
[SugarColumn(IsNullable = true, ColumnDescription = "人员来源")]
public string Source { get; set; }
///
/// 姓名
///
[SugarColumn(IsNullable = false, ColumnDescription = "姓名")]
public string Name { get; set; }
///
/// 姓名
///
[SugarColumn(IsNullable = true, ColumnDescription = "姓名")]
public string NameEn { get; set; }
///
/// 学工号
///
[SugarColumn(IsNullable = false, ColumnDescription = "学工号", UniqueGroupNameList = new[] { "idx_Gainfo_Code" })]
public string Code { get; set; }
///
/// 国家代码
///
[SugarColumn(IsNullable = true, ColumnDescription = "国家代码")]
public string CountryNo { get; set; }
///
/// 证件类型代码
///
[SugarColumn(IsNullable = true, ColumnDescription = "证件类型代码")]
public string IdClass { get; set; }
///
/// 身份证号
///
[SugarColumn(IsNullable = true, ColumnDescription = "身份证号", UniqueGroupNameList = new[] { "idx_Gainfo_IdNo" })]
public string IdNo { get; set; }
///
/// 身份证籍贯区域代码
///
[SugarColumn(IsNullable = true, ColumnDescription = "身份证籍贯区域代码")]
public string Native { get; set; }
///
/// 性别
///
[SugarColumn(IsNullable = false, ColumnDescription = "性别", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public GenderEnumType Gender { get; set; }
///
/// 生日
///
[SugarColumn(IsNullable = true, ColumnDescription = "生日")]
public DateTime? Birthday { get; set; }
///
/// 身份证地址
///
[SugarColumn(IsNullable = true, ColumnDescription = "身份证地址")]
public string Address { get; set; }
///
/// 部门编码
///
[SugarColumn(IsNullable = true, ColumnDescription = "部门编码")]
public string DepartmentNo { get; set; }
///
/// 民族代码
///
[SugarColumn(IsNullable = true, ColumnDescription = "民族代码")]
public string Nation { get; set; }
///
/// 手机号码
///
[SugarColumn(IsNullable = true, ColumnDescription = "手机号码")]
public string Phone { get; set; }
///
/// 学历
///
[SugarColumn(IsNullable = true, ColumnDescription = "学历")]
public string Degree { get; set; }
///
/// 岗位
///
[SugarColumn(IsNullable = true, ColumnDescription = "岗位")]
public string PositionNo { get; set; }
///
/// 职等
///
[SugarColumn(IsNullable = true, ColumnDescription = "职等")]
public string Grade { get; set; }
///
/// 职级
///
[SugarColumn(IsNullable = true, ColumnDescription = "职级")]
public string Title { get; set; }
///
/// 卡号
///
[SugarColumn(IsNullable = true, ColumnDescription = "卡号", IndexGroupNameList = new[] { "idx_Gainfo_CardNo" })]
public string CardNo { get; set; }
///
/// 备注
///
[SugarColumn(IsNullable = true, ColumnDescription = "备注")]
public string Remark { get; set; }
///
/// 人事范围
///
[SugarColumn(IsNullable = true, ColumnDescription = "人事范围")]
public string Werks { get; set; }
///
/// 工作地
///
[SugarColumn(IsNullable = false, ColumnDescription = "工作地")]
public string Workplace { get; set; }
///
/// 厂区
///
[TenantId]
[SugarColumn(IsNullable = false, ColumnDescription = "厂区")]
public string Factory { get; set; }
///
/// 成本中心
///
[SugarColumn(IsNullable = true, ColumnDescription = "成本中心")]
public string CostId { get; set; }
///
/// 入职日期
///
[SugarColumn(IsNullable = true, ColumnDescription = "入职日期", ColumnDataType = "date")]
public DateTime? EntryDate { get; set; }
///
/// 离职日期
///
[SugarColumn(IsNullable = true, ColumnDescription = "离职日期", ColumnDataType = "date")]
public DateTime? ResignationDate { get; set; }
///
/// 身份认证用户Id(如果为空匹配code)
///
[SugarColumn(IsNullable = true, ColumnDescription = "身份认证用户Id")]
public int IdentityUserId { get; set; }
///
/// 卡类型
///
[SugarColumn(IsNullable = true, ColumnDescription = "卡类型")]
public int? CardType { get; set; }
}
///
/// 离职人员档案表
///
[SugarTable(TableName = "GainfoLeave", TableDescription = "离职人员档案表")]
public class GainfoLeaveEntity : GainfoEntity
{
}