EquipmentPropBase.cs 1.56 KB
using FreeSql.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using HHECS.DAQShared.Common.Enums;

namespace HHECS.DAQShared.Models
{
    public abstract class EquipmentPropBase : BaseEntityCU<int>
    {
        [MaxLength(50)]
        [Column(IsNullable = false, Position = 4)]
        public string Code { get; set; } = null!;

        [MaxLength(50)]
        [Column(IsNullable = false, Position = 5)]
        public string Name { get; set; } = null!;

        /// <summary>
        /// 监控地址、常规地址、自身属性
        /// </summary>
        [Column(IsNullable = false, DbType = "varchar(50)", MapType = typeof(string), Position = 6)]
        public EquipmentPropType PropType { get; set; }

        /// <summary>
        ///  当前属性的数据类型
        /// </summary>
        [Column(IsNullable = false, DbType = "varchar(50)", MapType = typeof(string), Position = 7)]
        public EquipmentDataType DataType { get; set; }

        /// <summary>
        /// 固定地址
        /// </summary>
        [MaxLength(50)]
        public string Address { get; set; } = null!;

        /// <summary>
        /// 比较值
        /// </summary>
        [MaxLength(50)]
        public string MonitorCompareValue { get; set; } = null!;

        /// <summary>
        /// 正常输出
        /// </summary>
        [MaxLength(50)]
        public string MonitorNormal { get; set; } = null!;

        /// <summary>
        /// 异常输出文本
        /// </summary>
        [MaxLength(50)]
        public string MonitorFailure { get; set; } = null!;
    }
}