58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Zxd.Entity.Zxd
|
|
{
|
|
[Table("t_early_warning_template")]
|
|
public class EarlyWarningTemplate
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
public int Deptid { get; set; }
|
|
|
|
[Column("template_name")]
|
|
public string? TemplateName { get; set; }
|
|
|
|
[Column("period_from")]
|
|
public DateTime PeriodFrom { get; set; }
|
|
|
|
[Column("period_to")]
|
|
public DateTime PeriodTo { get; set; }
|
|
|
|
[Column("prewarning_value")]
|
|
public string? PrewarningValue { get; set; }
|
|
|
|
[Column("count")]
|
|
public int? Count { get; set; }
|
|
|
|
[Column("maxnum")]
|
|
public int Maxnum { get; set; }
|
|
|
|
[NotMapped]
|
|
public List<EarlyWarningTemplatePrewarningValue> PrewarningValueJson
|
|
{
|
|
get
|
|
{
|
|
return string.IsNullOrEmpty(PrewarningValue) ? new List<EarlyWarningTemplatePrewarningValue>()
|
|
: JsonSerializer.Deserialize<List<EarlyWarningTemplatePrewarningValue>>(PrewarningValue);
|
|
}
|
|
}
|
|
|
|
public List<EarlyWarningSetting>? EarlyWarningSettings { get; set; }
|
|
}
|
|
|
|
public class EarlyWarningTemplatePrewarningValue
|
|
{
|
|
[JsonPropertyName("type")]
|
|
public EarlyWarningType Type { get; set; }
|
|
|
|
[JsonPropertyName("value")]
|
|
public int Value { get; set; }
|
|
|
|
[JsonPropertyName("guid")]
|
|
public string? Guid { get; set; }
|
|
}
|
|
} |