using System.ComponentModel.DataAnnotations; using Admin.NET.Core; using Nest; using SqlSugar; using Yitter.IdGenerator; namespace Admin.Bodk.Device.Entities.equipment; /// /// M9数据表 /// [SugarTable(null, "M9数据表")] [SysTable] public class M9: 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 HostName { get; set; } [SugarColumn(ColumnDescription = "网口、串口", Length = 32, IsNullable = true)] public virtual string DomainName { get; set; } [SugarColumn(ColumnDescription = "网口名称", Length = 32)] [Required] public virtual string InterfaceName { get; set; } [SugarColumn(ColumnDescription = "设备IP", Length = 32)] [Required] public virtual string IPAddresses { get; set; } } public class M9Input: BasePageInput { /// /// 设备名称 /// public string HostName { get; set; } /// /// 网口、串口 /// public string DomainName { get; set; } /// /// 设备IP /// public List IPInterfaces { get; set; } } public class IPInterfaces { public string InterfaceName { get; set; } public string IPAddresses { get; set; } }