You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using Admin.NET.Core;
|
|
|
|
using Nest;
|
|
|
|
using SqlSugar;
|
|
|
|
using Yitter.IdGenerator;
|
|
|
|
|
|
|
|
namespace Admin.Bodk.Customer.Entities;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 客户表
|
|
|
|
/// </summary>
|
|
|
|
[SugarTable("bodk_customer", "客户表")]
|
|
|
|
[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; }
|
|
|
|
|
|
|
|
[SugarColumn(ColumnDescription = "数据来源")]
|
|
|
|
public virtual DataSource Source { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum Sex
|
|
|
|
{
|
|
|
|
Man = 1,
|
|
|
|
Woman = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum DataSource
|
|
|
|
{
|
|
|
|
App = 1,
|
|
|
|
Input = 2
|
|
|
|
}
|