EquipmentTypePropTemplate.cs
3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
using System.ComponentModel.DataAnnotations;
using ColumnAttribute = System.ComponentModel.DataAnnotations.Schema.ColumnAttribute;
using TableAttribute = System.ComponentModel.DataAnnotations.Schema.TableAttribute;
namespace HHECS.Model.Entities
{
/// <summary>
/// 属性模板
/// </summary>
[Table("base_equipment_type_template")]
public class EquipmentTypePropTemplate : BaseEntityCU<int>
{
private string code;
[Column(Order = 2)]
[MaxLength(50)]
[Required]
public string Code
{
get { return code; }
set { code = value; }
}
private string name;
[Column(Order = 3)]
[MaxLength(50)]
[Required]
public string Name
{
get { return name; }
set { name = value; }
}
[Column(Order = 4)]
[Required]
public int EquipmentTypeId { get; set; }
private string description;
[Column(Order = 5)]
[MaxLength(200)]
public string Description
{
get { return description; }
set { description = value; }
}
private string propType;
/// <summary>
/// 监控地址、常规地址、自身属性;取枚举的name而不是index
/// </summary>
[Column(Order = 6)]
[MaxLength(50)]
[Required]
public string PropType
{
get { return propType; }
set { propType = value; }
}
private string dataType;
/// <summary>
/// 当前属性的数据类型
/// </summary>
[Column(Order = 7)]
[MaxLength(50)]
[Required]
public string DataType
{
get { return dataType; }
set { dataType = value; }
}
/// <summary>
/// 固定地址
/// </summary>
[Column(Order = 8)]
[MaxLength(50)]
public string Address { get; set; }
/// <summary>
/// 偏移量
/// </summary>
[Column(Order = 8)]
[MaxLength(50)]
public string Offset { get; set; }
private int readLength;
/// <summary>
/// 读取长度
/// </summary>
[Column(Order = 10)]
public int ReadLength
{
get { return readLength; }
set { readLength = value; }
}
/// <summary>
/// 比较值
/// </summary>
[Column(Order = 11)]
[MaxLength(50)]
public string MonitorCompareValue { get; set; }
/// <summary>
/// 正常输出
/// </summary>
[Column(Order = 12)]
[MaxLength(50)]
public string MonitorNormal { get; set; }
/// <summary>
/// 异常输出文本
/// </summary>
[Column(Order = 13)]
[MaxLength(50)]
public string MonitorFailure { get; set; }
//逻辑外键
public EquipmentType EquipmentType { get; set; }
}
}