using Newtonsoft.Json; using SqlSugar; namespace LY.App.Model { [SugarTable("ly_white_list")] public class Whitelist : BaseEntity { /// /// 设备序列号 /// public string sn { get; set; } [SugarColumn(ColumnName = "all_day", ColumnDescription = "是否全天")] public bool allDay { get; set; } [SugarColumn(IsNullable = true)] public DateTime? startTime { get; set; } [SugarColumn(IsNullable = true)] public DateTime? endTime { get; set; } [JsonConverter(typeof(ValueToStringConverter))] [SugarColumn(ColumnName = "position_id", ColumnDescription = "阵地id")] public long positionId { get; set; } public string positionName { get; set; } } public class AddWhitelist { /// /// 设备序列号 /// public string sn { get; set; } /// /// 是否全天 /// public bool allDay { get; set; } /// /// 开始时间 /// public DateTime? startTime { get; set; } /// /// 结束时间 /// public DateTime? endTime { get; set; } /// /// 阵地id /// public long positionId { get; set; } /// /// 阵地名称 /// public string positionName { get; set; } } public class UpdateWhitelist : AddWhitelist { public long id { get; set; } } }