EquipmentAlarmRecordDetail.cs 2.37 KB
using FreeSql.DataAnnotations;
using HHECS.DataContract;

namespace HHECS.DAQShared.Models
{
    /// <summary>
    /// 设备报警记录明细
    /// </summary>
    [Table(Name = "daq_equipment_alarm_record_detail", DisableSyncStructure = true)]
    [Index($"uk_{nameof(EquipmentCode)}", $"{nameof(EquipmentCode)}", false)]
    [Index($"uk_{nameof(EquipmentPropCode)}", $"{nameof(EquipmentPropCode)}", false)]
    [Index($"uk_{nameof(EquipmentTypeCode)}", $"{nameof(EquipmentTypeCode)}", false)]
    [Index($"uk_{nameof(FactoryCode)}", $"{nameof(FactoryCode)}", false)]
    [Index($"uk_{nameof(ProjectCode)}", $"{nameof(ProjectCode)}", false)]
    public class EquipmentAlarmRecordDetail: BaseEntity<Guid>
    {
        /// <summary>
        /// 主表Id
        /// </summary>
        /// <remarks><see cref="EquipmentAlarmRecord"/></remarks>
        public Guid EquipmentAlarmRecordId { get; set; }

        /// <summary>
        /// 设备编码
        /// </summary>
        public string EquipmentCode { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string EquipmentName { get; set; }

        /// <summary>
        /// 设备属性编号
        /// </summary>
        public string EquipmentPropCode { get; set; }

        /// <summary>
        /// 设备属性名称
        /// </summary>
        public string EquipmentPropName { get; set; }

        /// <summary>
        /// 设备类型编号
        /// </summary>
        public string EquipmentTypeCode { get; set; } = null!;

        /// <summary>
        /// 报警信息
        /// </summary>
        public string AlarmMessage { get; set; }

        /// <summary>
        /// 项目编号
        /// </summary>
        public string ProjectCode { get; set; }

        /// <summary>
        /// 仓库编号
        /// </summary>
        public string FactoryCode { get; set; }

        /// <summary>
        /// 是否已结束
        /// </summary>
        public bool IsEnd { get; set; }

        /// <summary>
        /// 报警持续时间
        /// </summary>
        /// <remarks>秒</remarks>
        public int ErrorDuration { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }
}