using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace GDNXFD.Data { /// /// 自定义报警规则 /// [Table("ALERTRULE2")] public class AlertRule : INotifyPropertyChanged { private string _id; //编码 private string _name; //名称 private string _expression; //表达式 private string _description; //描述 private string _tag; //标签 private string _rank; //级别 private bool _enabled; //是否启用 private string _modelId; //设备类型 private long _ednaValue; //报警值 private string _category; //报警类别 private string _range; //范围 private string _station; //场站 private string _windturbine; //风机 private string _line; //线路 private string _project; //工程 private string _electrical; //电气 [Column("ID")] public string Id { get { return _id; } set { _id = value; RaisePropertyChanged(); } } [Column("MODELID")] public string ModelId { get { return _modelId; } set { _modelId = value; RaisePropertyChanged(); } } [Column("NAME")] public string Name { get { return _name; } set { _name = value; RaisePropertyChanged(); } } [Column("DESCRIPTION")] public string Description { get { return _description; } set { _description = value; RaisePropertyChanged(); } } [Column("EXPRESSION")] public string Expression { get { return _expression; } set { _expression = value; RaisePropertyChanged(); } } [Column("TAG")] public string Tag { get { return _tag; } set { _tag = value; RaisePropertyChanged(); } } [Column("RANK")] public string Rank { get { return _rank; } set { _rank = value; RaisePropertyChanged(); } } [Column("ENABLED")] public bool Enabled { get { return _enabled; } set { _enabled = value; RaisePropertyChanged(); } } [Column("EDNAVALUE")] public long EdnaValue { get { return _ednaValue; } set { _ednaValue = value; RaisePropertyChanged(); } } [Column("CATEGORY")] public string Category { get { return _category; } set { _category = value; RaisePropertyChanged(); } } [Column("RANGE")] public string Range { get { return _range; } set { _range = value; RaisePropertyChanged(); } } [Column("STATION")] public string Station { get { return _station; } set { _station = value; RaisePropertyChanged(); } } [Column("WINDTURBINE")] public string Windturbine { get { return _windturbine; } set { _windturbine = value; RaisePropertyChanged(); } } [Column("PROJECT")] public string Project { get { return _project; } set { _project = value; RaisePropertyChanged(); } } [Column("LINE")] public string Line { get { return _line; } set { _line = value; RaisePropertyChanged(); } } [Column("ELECTRICAL")] public string Electrical { get { return _electrical; } set { _electrical = value; RaisePropertyChanged(); } } /// /// Property changed event /// public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged([CallerMemberName] string caller = "") { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(caller)); } } } }