using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.Json.Nodes; using System.Threading.Tasks; namespace ZhongLianModel { [SugarTable("ZL_Install_{year}{month}{day}")] [SplitTable(SplitType.Year)] public class InstallDO { /// /// 编号 /// [SugarColumn(IsPrimaryKey = true, Length = 100)] public string? Id { get; set; } /// /// 安装地点 /// [SugarColumn(IsNullable = true, Length = 200)] public string? Address { get; set; } /// /// 设备编号 /// [SugarColumn(IsNullable = true, Length = 100)] public string? DeviceId { get; set; } /// /// 设备信息 /// [SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")] public Dictionary? Device { get; set; } /// /// 工作内容:安装,加节,拆卸 /// [SugarColumn(IsNullable = true, Length = 50)] public string? Action { get; set; } /// /// 安装人员编号 /// [SugarColumn(IsNullable = true, Length = 100)] public string? InstallUid { get; set; } /// /// 安装人员信息 /// [SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")] public Dictionary? InstallUser { get; set; } /// /// 安装时间 /// [SugarColumn(IsNullable = true)] public DateTime? InstallDate { get; set; } /// /// 巡检人员编号 /// [SugarColumn(IsNullable = true, Length = 100)] public string? PatrolUid { get; set; } /// /// 巡检人员信息 /// [SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")] public Dictionary? PatrolUser { get; set; } /// /// 巡检时间 /// [SugarColumn(IsNullable = true)] public DateTime? PatrolDate { get; set; } /// /// 安装单状态,0:未完成,1:安装人员已提交,2:巡检人员未通过,3:已完成 /// [SugarColumn(IsNullable = true, Length = 2)] public int? State { get; set; } /// /// 备注 /// [SugarColumn(IsNullable = true, ColumnDataType = "Text")] public string? Remark { get; set; } /// /// 创建日期 /// [SplitField] [SugarColumn(IsNullable = true)] public DateTime? CreateDate { get; set; } /// /// 最后更新日期 /// [SugarColumn(IsNullable = true)] public DateTime? LastDate { get; set; } #region 业务字段 /// /// 创建日期文字 /// [SugarColumn(IsIgnore = true)] public string? CreateDateText { get { if (CreateDate == null) { return null; } else { return ((DateTime)CreateDate).ToString("yyyyMMddHHmmss"); } } } /// /// 安装日期文字 /// [SugarColumn(IsIgnore = true)] public string? InstallDateDateText { get { if (InstallDate == null) { return null; } else { return ((DateTime)InstallDate).ToString("yyyyMMddHHmmss"); } } } /// /// 巡检日期文字 /// [SugarColumn(IsIgnore = true)] public string? PatrolDateText { get { if (PatrolDate == null) { return null; } else { return ((DateTime)PatrolDate).ToString("yyyyMMdd"); } } } /// /// 安装步骤 /// [SugarColumn(IsIgnore = true)] public InstallStepDO[]? Steps { get; set; } #endregion } }