操控平台后端代码
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.

47 lines
1.2 KiB

6 months ago
using System.ComponentModel.DataAnnotations;
using Admin.NET.Core;
using Nest;
using SqlSugar;
using Yitter.IdGenerator;
namespace Admin.Bodk.Customer.Entities;
6 months ago
/// <summary>
/// 客户表
/// </summary>
[SugarTable("bodk_customer", "客户表")]
6 months ago
[SysTable]
public class Customer : EntityTenant, IRepositorySettings
6 months ago
{
[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; }
6 months ago
[SugarColumn(ColumnDescription = "性别")]
[Required]
public virtual Sex Sex { get; set; }
[SugarColumn(ColumnDescription = "身份证号码", Length = 32, IsNullable = true)]
6 months ago
public virtual string IdNo { get; set; }
[SugarColumn(ColumnDescription = "手机号码", Length = 32, IsNullable = true)]
6 months ago
public virtual string PhoneNo { get; set; }
[SugarColumn(ColumnDescription = "数据来源")]
public virtual DataSource Source { get; set; }
6 months ago
}
public enum Sex
{
Man = 1,
Woman = 0
}
public enum DataSource
{
App = 1,
Input = 2
6 months ago
}