using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HBLConsole.Model
{
    /// <summary>
    /// 模拟量报警模块
    /// </summary>
    public class AnalogAlarmModel
    {
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 设定报警值
        /// </summary>
        public int AlarmValue { get; set; } = 0;

        /// <summary>
        /// 是否启用该报警
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 报警信息
        /// </summary>
        public string AlarmInfo { get; set; }

        /// <summary>
        /// 报警标签
        /// </summary>
        public string AlarmTag { get; set; }

        /// <summary>
        /// 排序标签
        /// </summary>
        public EAnalogAlarmType SortTag { get; set; }

        /// <summary>
        /// 设置外键
        /// </summary>
        [ForeignKey("AlarmSetId")]
        public int AlarmSetId { get; set; }

        /// <summary>
        /// 设置导航属性
        /// </summary>
        public AlarmSet AlarmSet { get; set; }
    }
}
