equipment.go 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. package equipment
  2. import (
  3. "time"
  4. )
  5. //查询数据
  6. type Trigger_Abnormal struct {
  7. Id int `xorm:"not null pk autoincr INT(11)"`
  8. DataItem int `xorm:"INT(11)"`
  9. CreateUserId int `xorm:"VARCHAR(50)"`
  10. CreateBy string `xorm:"VARCHAR(50)"`
  11. UserName string `xorm:"VARCHAR(50)"`
  12. CreateOn time.Time `xorm:"DATETIME created"`
  13. Serial string `xorm:"VARCHAR(500)"`
  14. Time time.Time `field:"time,f"`
  15. }
  16. //查询数据1
  17. type Trigger_Abnormal1 struct {
  18. CreateBy string `xorm:"VARCHAR(50)"`
  19. CreateOn time.Time `xorm:"DATETIME created"`
  20. Serial string `xorm:"VARCHAR(500)"`
  21. Time time.Time `field:"time,f"`
  22. Online int `xorm:"INT(10)"`
  23. }
  24. type EquipMent struct {
  25. Id int `xorm:"not null pk autoincr INT(10)"`
  26. ModelId int `xorm:"INT(10)"`
  27. Code string `xorm:"VARCHAR(50)"`
  28. DeviceState int `xorm:"INT(10)"`
  29. ChannelState int `xorm:"INT(10)"`
  30. ChannelNum int `xorm:"INT(10)"`
  31. SortCode int `xorm:"INT(10)"`
  32. Enabled int `xorm:"not null default 1 INT(10)"`
  33. CreateOn time.Time `xorm:"DATETIME created" form:"-" json:"-"`
  34. CreateUserId int `xorm:"INT(11)" form:"-" json:"-"`
  35. CreateBy string `xorm:"VARCHAR(50)" form:"-"`
  36. ModifiedOn time.Time `xorm:"DATETIME updated" form:"-" json:"-"`
  37. ModifiedUserId int `xorm:"INT(11)" form:"-" json:"-"`
  38. ModifiedBy string `xorm:"VARCHAR(50)" form:"-" json:"-"`
  39. Local string `xorm:"VARCHAR(50)"`
  40. Latitude int `xorm:"INT(10)"`
  41. Longitude int `xorm:"INT(10)"`
  42. OrganizeId int `xorm:"INT(10)"`
  43. OrganizeName string `xorm:"VARCHAR(50)"`
  44. }
  45. type Base_User struct {
  46. Id int `xorm:"not null pk autoincr INT(10)"`
  47. AccCode string `xorm:"VARCHAR(50)"`
  48. Username string `xorm:"VARCHAR(50)"`
  49. Realname string `xorm:"VARCHAR(50)"`
  50. }
  51. type EquipMentModel struct {
  52. Id int `xorm:"not null pk autoincr INT(10)"`
  53. DItem int `xorm:"INT(10)"`
  54. DItemName string `xorm:"VARCHAR(50)"`
  55. Brands string `xorm:"VARCHAR(50)"`
  56. DModel string `xorm:"VARCHAR(50)"`
  57. Structure string `xorm:"VARCHAR(50)"`
  58. Photo string `xorm:"VARCHAR(50)"`
  59. LowTemperature int `xorm:"INT(10)"`
  60. HightTemperature int `xorm:"INT(10)"`
  61. SortCode int `xorm:"INT(10)"`
  62. Enabled int `xorm:"not null default 1 INT(10)"`
  63. CreateOn time.Time `xorm:"DATETIME created" form:"-" json:"-"`
  64. CreateUserId int `xorm:"INT(11)" form:"-" json:"-"`
  65. CreateBy string `xorm:"VARCHAR(50)" form:"-"`
  66. ModifiedOn time.Time `xorm:"DATETIME updated" form:"-" json:"-"`
  67. ModifiedUserId int `xorm:"INT(11)" form:"-" json:"-"`
  68. ModifiedBy string `xorm:"VARCHAR(50)" form:"-" json:"-"`
  69. Remark string `xorm:"VARCHAR(50)"`
  70. SpareData string `xorm:"VARCHAR(50)"`
  71. }
  72. type EquipMentSort struct {
  73. Id int `xorm:"<- not null pk autoincr INT(10)"`
  74. UserId int `xorm:"INT(10)"`
  75. EquipMentlId int `xorm:"INT(10)"`
  76. SortCode int `xorm:"INT(10)"`
  77. CreateOn time.Time `xorm:"DATETIME created" form:"-" json:"-"`
  78. CreateUserId int `xorm:"INT(11)" form:"-" json:"-"`
  79. CreateBy string `xorm:"VARCHAR(50)" form:"-"`
  80. ModifiedOn time.Time `xorm:"DATETIME updated" form:"-" json:"-"`
  81. ModifiedUserId int `xorm:"INT(11)" form:"-" json:"-"`
  82. ModifiedBy string `xorm:"VARCHAR(50)" form:"-" json:"-"`
  83. }
  84. type EquipmentSet struct {
  85. Id int
  86. Code string
  87. SortCode int
  88. DeviceState int
  89. OrganizeId int
  90. OrganizeName string
  91. Brands string
  92. TagCode string
  93. MaxValue string
  94. MinValue string
  95. DModel string
  96. Photo string
  97. CTitle string //传感器名称,会有多个,已逗号隔开
  98. CSerial string //传感器序列号,会有多个,已逗号隔开
  99. CDataItem string //传感器类型,会有多个,已逗号隔开
  100. }
  101. type EquipmentReport struct {
  102. OrganizeId int //组织ID
  103. OrganizeName string //组织名称
  104. DItem int //设备类型
  105. DItemName string //设备类型名
  106. Num int //设备数量
  107. Ids string //设备ID,多个用逗号隔开
  108. Triggercount int
  109. }
  110. type EquipmentIdCode struct {
  111. Id string
  112. Code string
  113. }
  114. type Base_UserEquipments struct {
  115. Id int `xorm:"<- not null pk autoincr INT(10)"`
  116. AccCode string `xorm:"VARCHAR(50)"`
  117. UserId int `xorm:"INT(10)"`
  118. EquipmentId int `xorm:"not null INT(10)"`
  119. Sortcode int `xorm:"INT(10)"`
  120. Enabled int `xorm:"not null default 1 INT(10)"`
  121. Description string `xorm:"VARCHAR(100)"`
  122. Createon time.Time `xorm:"DATETIME created" form:"-" json:"-"`
  123. Createuserid int `xorm:"INT(11)" form:"-" json:"-"`
  124. Createby string `xorm:"VARCHAR(50)" form:"-" json:"-"`
  125. Modifiedon time.Time `xorm:"DATETIME updated" form:"-" json:"-"`
  126. Modifieduserid int `xorm:"INT(11)" form:"-" json:"-"`
  127. Modifiedby string `xorm:"VARCHAR(50)" form:"-" json:"-"`
  128. }
  129. //报警历史
  130. type Record_History struct {
  131. Id int
  132. ProjectSourse string
  133. ProjectAccount string
  134. ProjectAccountName string
  135. SendTo string
  136. ActionType string
  137. Message string
  138. IsRead int
  139. IsSend int
  140. SendErrorMsg string
  141. DeviceId string
  142. DeviceName string
  143. ChannelCode string
  144. ChannelName string
  145. CreateOn time.Time
  146. CreateUserId int
  147. CreateBy string
  148. ModifiedOn time.Time
  149. ModifiedUserId int
  150. ModifiedBy string
  151. CausePerson string
  152. }