EquipmentStatusRecord.cs 1.92 KB
using FreeSql.DataAnnotations;
using HHECS.DataContract;

namespace HHECS.DAQShared.Models
{
    /// <summary>
    /// 设备状态记录
    /// </summary>
    [Table(Name = "daq_equipment_status_record", DisableSyncStructure = true)]
    [Index($"uk_{nameof(EquipmentCode)}", $"{nameof(EquipmentCode)}", false)]
    [Index($"uk_{nameof(EquipmentTypeCode)}", $"{nameof(EquipmentTypeCode)}", false)]
    public class EquipmentStatusRecord : BaseEntity<Guid>
    {
        /// <summary>
        /// 设备编号/IOT云平台设备SN
        /// </summary>
        public string EquipmentCode { get; set; } = null!;

        /// <summary>
        /// 设备名称
        /// </summary>
        public string EquipmentName { get; set; } = null!;
        /// <summary>
        /// 设备类型
        /// </summary>
        public string EquipmentTypeCode { get; set; } = null!;

        /// <summary>
        /// 状态
        /// </summary>
        public string Status { get; set; } = null!;

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

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

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

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

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime? HandleTime { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; } = null!;

        /// <summary>
        /// 状态时长 (单位秒)
        /// </summary>
        public int StatusDuration { get; set; }
    }
}