EquipmentDataQueue.cs 1.36 KB
using FreeSql.DataAnnotations;
using HHECS.DataContract;
using HHECS.DAQClient.Dto;

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

        /// <summary>
        /// 设备类型
        /// </summary>
        public string EquipmentTypeCode { get; set; }

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

        /// <summary>
        /// 数据数组
        /// </summary>
        /// <remarks><see cref="TagItem"/></remarks>
        public string Reported { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public int Version { get; set; }

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

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