123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- 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
- {
- /// <summary>
- /// 自定义报警规则
- /// </summary>
- [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();
- }
- }
- /// <summary>
- /// Property changed event
- /// </summary>
- public event PropertyChangedEventHandler PropertyChanged;
- private void RaisePropertyChanged([CallerMemberName] string caller = "")
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(caller));
- }
- }
- }
- }
|