You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
4.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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
{
/// <summary>
/// 编号
/// </summary>
[SugarColumn(IsPrimaryKey = true, Length = 100)]
public string? Id { get; set; }
/// <summary>
/// 安装地点
/// </summary>
[SugarColumn(IsNullable = true, Length = 200)]
public string? Address { get; set; }
/// <summary>
/// 设备编号
/// </summary>
[SugarColumn(IsNullable = true, Length = 100)]
public string? DeviceId { get; set; }
/// <summary>
/// 设备信息
/// </summary>
[SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")]
public Dictionary<string, dynamic>? Device { get; set; }
/// <summary>
/// 工作内容:安装,加节,拆卸
/// </summary>
[SugarColumn(IsNullable = true, Length = 50)]
public string? Action { get; set; }
/// <summary>
/// 安装人员编号
/// </summary>
[SugarColumn(IsNullable = true, Length = 100)]
public string? InstallUid { get; set; }
/// <summary>
/// 安装人员信息
/// </summary>
[SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")]
public Dictionary<string, dynamic>? InstallUser { get; set; }
/// <summary>
/// 安装时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? InstallDate { get; set; }
/// <summary>
/// 巡检人员编号
/// </summary>
[SugarColumn(IsNullable = true, Length = 100)]
public string? PatrolUid { get; set; }
/// <summary>
/// 巡检人员信息
/// </summary>
[SugarColumn(IsJson = true, IsNullable = true, ColumnDataType = "Text")]
public Dictionary<string, dynamic>? PatrolUser { get; set; }
/// <summary>
/// 巡检时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? PatrolDate { get; set; }
/// <summary>
/// 安装单状态,0未完成1安装人员已提交2巡检人员未通过3已完成
/// </summary>
[SugarColumn(IsNullable = true, Length = 2)]
public int? State { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(IsNullable = true, ColumnDataType = "Text")]
public string? Remark { get; set; }
/// <summary>
/// 创建日期
/// </summary>
[SplitField]
[SugarColumn(IsNullable = true)]
public DateTime? CreateDate { get; set; }
/// <summary>
/// 最后更新日期
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? LastDate { get; set; }
#region 业务字段
/// <summary>
/// 创建日期文字
/// </summary>
[SugarColumn(IsIgnore = true)]
public string? CreateDateText
{
get
{
if (CreateDate == null)
{
return null;
}
else
{
return ((DateTime)CreateDate).ToString("yyyyMMddHHmmss");
}
}
}
/// <summary>
/// 安装日期文字
/// </summary>
[SugarColumn(IsIgnore = true)]
public string? InstallDateDateText
{
get
{
if (InstallDate == null)
{
return null;
}
else
{
return ((DateTime)InstallDate).ToString("yyyyMMddHHmmss");
}
}
}
/// <summary>
/// 巡检日期文字
/// </summary>
[SugarColumn(IsIgnore = true)]
public string? PatrolDateText
{
get
{
if (PatrolDate == null)
{
return null;
}
else
{
return ((DateTime)PatrolDate).ToString("yyyyMMdd");
}
}
}
/// <summary>
/// 安装步骤
/// </summary>
[SugarColumn(IsIgnore = true)]
public InstallStepDO[]? Steps { get; set; }
#endregion
}
}