EquipmentStatusRecord.cs
2.55 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
using TableAttribute = System.ComponentModel.DataAnnotations.Schema.TableAttribute;
using ColumnAttribute = System.ComponentModel.DataAnnotations.Schema.ColumnAttribute;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace HHECS.Model.Entities
{
/// <summary>
/// 对于状态记录,理论上我们需要将多种设备统一状态记录,目前只有堆垛机
/// 设备统一状态:故障、维护、手动、空闲、运行
/// </summary>
[Table("equipmentstatusrecord")]
public class EquipmentStatusRecord : BaseEntityCU<long>
{
[Column(Order = 1)]
public string EquipmentCode { get; set; }
[Column(Order = 2)]
public string EquipmentName { get; set; }
/// <summary>
/// 设备的状态,简单起见,记录文本,分为Error,Manual,Maintain,Idle,Running
/// </summary>
[Column(Order = 3)]
public string EquipmentStatus { get; set; }
/// <summary>
/// 指示是否记录状态结束
/// 持续时间以update减去create计算,默认还是按5秒没有接收到自动关闭
/// </summary>
[Column(Order = 4)]
public bool IsEnd { get; set; }
/// <summary>
/// 仓库
/// </summary>
[Column(Order = 5)]
public string WarehouseCode { get; set; }
/// <summary>
/// 持续时间
/// </summary>
[NotMapped]
public TimeSpan? Time => Updated != null && Created != null ? Updated - Created : null;
/// <summary>
/// 行走电机温度(℃) lsw
/// </summary>
[NotMapped]
public string WalkTemperature { get; set; }
/// <summary>
/// 行走电机振速(mm/s)lsw
/// </summary>
[NotMapped]
public string WalkVibrationVelocity { get; set; }
/// <summary>
/// 升降电机温度(℃)lsw
/// </summary>
[NotMapped]
public string LiftTemperature { get; set; }
/// <summary>
/// 升降电机振速(mm/s)lsw
/// </summary>
[NotMapped]
public string LiftVibrationVelocity { get; set; }
/// <summary>
/// 运行电流
/// </summary>
[Column(Order = 5)]
public string runCurrent { get; set; }
/// <summary>
/// 升降电流
/// </summary>
[Column(Order = 5)]
public string liftCurrent { get; set; }
[NotMapped]
public string WarehouseCodeExt { get; set; }
}
}