EquipmentDataQueue.cs 1.26 KB
using DataAcquisition.ViewModels.IOT;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DataAcquisition.Models
{
    [Comment("数据推送队列")]
    [Table("EquipmentDataQueue")]
    public class EquipmentDataQueue
    {
        [Key]
        public Guid Id { get; set; }

        [Comment("设备编号")]
        public string EquipmentCode { get; set; } = null!;

        [Comment("设备类型")]
        public string EquipmentTypeCode { get; set; } = null!;

        [Comment("设备名称")]
        public string EquipmentName { get; set; } = null!;

        /// <summary>
        /// Json数据
        /// </summary>
        /// <remarks><see cref="TagItem"/></remarks>
        [Comment("数据数组")]
        public string Reported { get; set; } = null!;

        [Comment("版本号")]
        public int Version { get; set; }

        [Comment("数据源时间戳")]
        public long SourceTimestamp { get; set; }

        [Comment("是否已提交")]
        public bool IsCommit { get; set; }

        [Comment("创建时间")]
        public DateTime? CreateTime { get; set; }

        [Comment("修改时间")]
        public DateTime? UpdateTime { get; set; }
    }
}