增加报警

This commit is contained in:
2025-01-01 17:41:48 +08:00
parent f26bf28181
commit 7b5df5877d
16 changed files with 896 additions and 122 deletions

View File

@@ -0,0 +1,75 @@
using FreeSql.DataAnnotations;
using System;
namespace CapMachine.Model.Alarm
{
/// <summary>
/// 报警配置信息
/// </summary>
[Table(Name = "AlarmConfig")]
public class AlarmConfig
{
/// <summary>
/// 主键
/// </summary>
[Column(IsPrimary = true, IsIdentity = true)]
public long Id { get; set; }
/// <summary>
/// 报警配置类别
/// </summary>
[Column(Name = "Category", IsNullable = false, StringLength = 20)]
public string? Category { get; set; }
/// <summary>
/// 报警的地址
/// </summary>
[Column(Name = "Address", IsNullable = false, StringLength = 20)]
public string? Address { get; set; }
/// <summary>
/// 报警等级
/// </summary>
[Column(Name = "AlarmLevel", IsNullable = false)]
public AlarmLevel AlarmLevel { get; set; }
/// <summary>
/// 激活类型
/// </summary>
[Column(Name = "ActiveType", IsNullable = false)]
public ActiveType ActiveType { get; set; }
/// <summary>
/// 报警配置名称
/// </summary>
[Column(Name = "Name", IsNullable = false, StringLength = 50)]
public string? Name { get; set; }
/// <summary>
/// 报警消息
/// </summary>
[Column(Name = "Message", IsNullable = false, StringLength = 150)]
public string? Message { get; set; }
/// <summary>
/// 布尔激活的阀值
/// </summary>
[Column(Name = "BoolActiveValue", IsNullable = false)]
public bool BoolActiveValue { get; set; }
/// <summary>
/// 报警上限阀值
/// </summary>
[Column(Name = "ThresholdUp", DbType = "decimal(8, 3)", IsNullable = true)]
public decimal ThresholdUp { get; set; }
/// <summary>
/// 报警下限阀值
/// </summary>
[Column(Name = "ThresholdDown", DbType = "decimal(8, 3)", IsNullable = true)]
public decimal ThresholdDown { get; set; }
[Column(ServerTime = DateTimeKind.Local, CanUpdate = false)]
public DateTime CreateTime { get; set; }
}
}