using System.ComponentModel.DataAnnotations; using Admin.NET.Core; using Nest; using SqlSugar; using Yitter.IdGenerator; namespace Admin.Bodk.Customer.Entities; /// /// 客户表 /// [SugarTable(null, "客户表")] [SysTable] public class Customer: EntityTenant, IRepositorySettings { [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = false)] public long Id { get; set; } = YitIdHelper.NextId(); [SugarColumn(ColumnDescription = "客户名称", Length = 32)] [Required, MaxLength(32)] public virtual string? Name { get; set; } [SugarColumn(ColumnDescription = "性别")] [Required] public virtual Sex Sex { get; set; } [SugarColumn(ColumnDescription = "身份证号码", Length = 32,IsNullable = true)] public virtual string IdNo { get; set; } [SugarColumn(ColumnDescription = "手机号码", Length = 32,IsNullable = true)] public virtual string PhoneNo { get; set; } } public enum Sex { Man = 1, Woman = 0 }