EquipmentDataQueue.cs 1.19 KB
using FreeSql.DataAnnotations;
using HHECS.DAQShared.Models;

namespace HHECS.DAQWebClient.Model
{
    /// <summary>
    /// 设备数据队列
    /// </summary>
    /// <remarks>存储采集到的设备数据并按顺序推送至Iot</remarks>
    [Table(Name = "daq_equipment_data_queue")]
    [Index($"idx_{nameof(EquipmentDataQueue)}_{nameof(EquipmentCode)}", $"{nameof(EquipmentCode)}", false)]
    public class EquipmentDataQueue : BaseEntityCU<Guid>
    {
        /// <summary>
        /// 设备编号
        /// </summary>
        public string EquipmentCode { get; set; } = null!;

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

        public string EquipmentPropCode { get; set; } = null!;

        public string EquipmentPropName { get; set; } = null!;

        /// <summary>
        /// 值
        /// </summary>
        public string Value { get; set; } = null!;

        /// <summary>
        /// 数据源时间戳
        /// </summary>
        public long SourceTimestamp { get; set; }

        /// <summary>
        /// 是否已提交
        /// </summary>
        public bool IsCommit { get; set; }
    }
}