using System.ComponentModel.DataAnnotations; using Admin.NET.Core; using Nest; using SqlSugar; using Yitter.IdGenerator; namespace Admin.Bodk.Device.Entities; /// /// 服务表 /// [SugarTable(null, "服务表")] [SysTable] public class Support: EntityBaseId, 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 = "基地ID",IsNullable = true)] public long BaseId { get; set; } [SugarColumn(ColumnDescription = "描述",IsNullable = true)] public string Remark { get; set; } // 导航属性 [SugarColumn(IsIgnore = true)] public virtual Base Base { get; set; } }