using System;
using System.Runtime.Serialization;
using SqlSugar;

namespace WCS.Entity.Protocol.HUB
{
    /// <summary>
    ///     设备运行信息
    /// </summary>
    [DataContract]
    [SugarTable("SX_DevAlarmInfo")]
    public class DevAlarmInfo : QuestDBBaseEntity
    {
        public DevAlarmInfo()
        {
        }

        public DevAlarmInfo(string alarm, DateTime startTime, DateTime endTime, long duration, string type, string code,
            DateTime frame)
        {
            Alarm = alarm;
            StartTime = startTime;
            EndTime = endTime;
            Duration = duration;
            Type = type;
            Code = code;
            Frame = frame;
        }

        /// <summary>
        ///     运行模式
        /// </summary>
        [SugarColumn(ColumnDataType = "symbol")]
        public string Alarm { get; set; }

        /// <summary>
        ///     开始时间
        /// </summary>

        public DateTime StartTime { get; set; }

        /// <summary>
        ///     结束时间
        /// </summary>

        public DateTime EndTime { get; set; }

        /// <summary>
        ///     总时长
        /// </summary>
        public long Duration { get; set; }

        /// <summary>
        ///     类型
        /// </summary>
        [SugarColumn(ColumnDataType = "symbol")]
        public string Type { get; set; }
    }
}