EquipmentPropertyRecord.cs 1.3 KB
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using IndexAttribute = Microsoft.EntityFrameworkCore.IndexAttribute;

namespace DataAcquisition.Models
{
    [Comment("设备状态历史记录")]
    [Table("EquipmentPropertyRecord")]
    [Index(nameof(EquipmentCode), nameof(EquipmentPropertyCode))]
    public class EquipmentPropertyRecord
    {
        [Key]
        [Comment("主键")]
        public Guid Id { get; set; }

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

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

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

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

        [Comment("值")]
        public string Value { get; set; } = null!;

        [Comment("是否结束")]
        public bool IsEnd { get; set; }

        [Comment("备注")]
        public string? Remark { get; set; }

        [Comment("开始时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        [Comment("结束时间")]
        public DateTime UpdateTime { get; set; }
    }
}