using System.ComponentModel.DataAnnotations; using Dlhis.Entity.Basic.Enums; namespace Dlhis.Basic.Organization.Request; public class GainfoSaveRequest : IValidatableObject { public long? Id { get; set; } /// /// 查询类型 /// [EnumDataType(typeof(GainfoStatusEnumType))] public GainfoStatusEnumType? GainfoStatus { get; set; } /// /// SAP内部编号 /// public string Ano { get; set; } /// /// 人员类型 /// public string Class { get; set; } /// /// 姓名 /// public string Gname { get; set; } /// /// 工号 /// public string Ename { get; set; } /// /// 国家代码 /// public string Country { get; set; } /// /// 证件类型代码 /// public string Idcls { get; set; } /// /// 身份证号 /// public string IdNO { get; set; } /// /// 身份证籍贯区域代码 /// public string Native { get; set; } /// /// 性别 /// public string Sex { get; set; } /// /// 生日 /// public DateTime Birthday { get; set; } /// /// 身份证地址 /// public string Address { get; set; } /// /// 已婚/未婚 /// public string Postcode { get; set; } /// /// 部门编码 /// public string Appellation { get; set; } /// /// 民族代码 /// public string Nation { get; set; } /// /// 手机号码 /// public string Phone { get; set; } /// /// 联系电话 /// public string Mobile { get; set; } /// /// 学历 /// public string Degree { get; set; } /// /// 岗位 /// public string Web { get; set; } /// /// 备注 /// public string Remark { get; set; } /// /// 操作账号 /// public string Log_id { get; set; } /// /// 操作班次 /// public string Log_shift { get; set; } /// /// 操作时间 /// public DateTime Log_date { get; set; } /// /// 操作IP /// public string Log_ip { get; set; } /// /// 是否在职 F 在职 T离职 /// public string Isowner { get; set; } /// /// 创建时间 /// public DateTime Createdate { get; set; } /// /// 外文名字 /// public string Gname_en { get; set; } /// /// 卡号 /// public string CarNo { get; set; } public IEnumerable Validate(ValidationContext validationContext) { if (GainfoStatus.HasValue && GainfoStatus == GainfoStatusEnumType.Leave) { yield return new ValidationResult("不支持离职人员新增/修改", new[] { nameof(GainfoStatus) }); } } }