EquipmentProperty.cs 1.65 KB
using FreeSql.DataAnnotations;

namespace HHECS.DAQShared.Models
{
    [Table(Name = "daq_equipmentProperty")]
    public class EquipmentProperty
    {
        [Column(IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 设备Id"
        /// </summary>
        public int EquipmentId { get; set; }

        /// <summary>
        /// 设备
        /// </summary>
        public virtual Equipment Equipment { get; set; } = null!;

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

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

        /// <summary>
        /// 属性类型
        /// </summary>
        public PropTypeConst PropType { get; set; }

        /// <summary>
        /// 节点
        /// </summary>
        public string Tag { get; set; } = null!;

        /// <summary>
        /// 值
        /// </summary>
        public string? Value { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

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

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
    }

    public enum PropTypeConst
    {
        /// <summary>
        /// 自身属性
        /// </summary>
        Self,

        /// <summary>
        /// 数据
        /// </summary>
        Data,

        /// <summary>
        /// 报警属性
        /// </summary>
        Alarm,
    }
}