IotEquipmentAlarm.cs 2.38 KB
using System.Text.Json.Serialization;

namespace DataAcquisition.ViewModels.IOT
{
    public class IotEquipmentAlarm: IotBase
    {
        /// <summary>
        /// 故障类型
        /// </summary>
        /// <remarks>1.零件意外失效 2.操作不當 3.一级保養不當 4.二级保養不當 5.维修改善不當 6.設備原有問題 7.調試中 8.定期保養 9.設備改善 10.其他 13.預防預知保養</remarks>
        [JsonPropertyName("alarm_type")]
        public AlarmTypeConst AlarmType { get; set; }

        /// <summary>
        /// 故障内容
        /// </summary>
        [JsonPropertyName("alarm_content")]
        public string AlarmContent { get; set; } = null!;

        /// <summary>
        /// 故障开始时间
        /// </summary>
        [JsonPropertyName("start_time")]
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 故障原因以及维修方法
        /// </summary>
        [JsonPropertyName("faulthandle_info")]
        public string FaulthandleInfo { get; set; } = null!;

        /// <summary>
        /// 报警是否结束
        /// </summary>
        /// <remarks>0:未结束,1:结束</remarks>
        public bool IsEnd { get; set; }

        /// <summary>
        /// 维修人员
        /// </summary>
        [JsonPropertyName("handle_user")]
        public string HandleUser { get; set; } = null!;

        /// <summary>
        /// 扩展列1
        /// </summary>
        [JsonPropertyName("extend_col1")]
        public string ExtendCol1 { get; set; } = null!;

        /// <summary>
        /// 扩展列2
        /// </summary>
        [JsonPropertyName("extend_col2")]
        public string ExtendCol2 { get; set; } = null!;

        /// <summary>
        /// 扩展列3
        /// </summary>
        [JsonPropertyName("extend_col3")]
        public string ExtendCol3 { get; set; } = null!;

        /// <summary>
        /// 扩展列4
        /// </summary>
        [JsonPropertyName("extend_col4")]
        public string ExtendCol4 { get; set; } = null!;
    }

    public enum AlarmTypeConst
    {
        零件意外失效 = 1,
        操作不当 = 2,
        一级保养不当 = 3,
        二级保养不当 = 4,
        维修改善不当 = 5,
        设备原有问题 = 6,
        调试中 = 7,
        定期保养 = 8,
        设备改善 = 9,
        其他 = 10,
        预防预知保养 = 11
    }
}