trigger.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. package trigger
  2. import (
  3. "time"
  4. )
  5. type Triggers struct {
  6. Id int `xorm:"not null pk INT(11)"`
  7. AId int
  8. AccCode string
  9. RemindTime time.Time
  10. ValidityDate time.Time
  11. KCCount float32
  12. ContentMode string
  13. Notification int
  14. TimeNotification int
  15. KCMin float32
  16. KCMax float32
  17. SPara3 string
  18. Feedback int
  19. FeedbackTime int
  20. SurplusCount int
  21. Category int
  22. Code string
  23. Switchalarm int
  24. }
  25. type Channels struct {
  26. Id int `xorm:"not null pk INT(11)"`
  27. Title string
  28. DataItem int
  29. About string
  30. ProjectSourse string
  31. ProjectAccount string
  32. ProjectAccountName string
  33. Well_ID string
  34. }
  35. //报警历史
  36. type Record_History struct {
  37. Id int
  38. ProjectSourse string
  39. ProjectAccount string
  40. ProjectAccountName string
  41. SendTo string
  42. ActionType string
  43. Message string
  44. IsRead int
  45. IsSend int
  46. SendErrorMsg string
  47. DeviceId string
  48. DeviceName string
  49. ChannelCode string
  50. ChannelName string
  51. CreateOn time.Time
  52. CreateUserId int
  53. CreateBy string
  54. ModifiedOn time.Time
  55. ModifiedUserId int
  56. ModifiedBy string
  57. }
  58. type Channels_dg_oilwell struct {
  59. Id int `xorm:"not null pk INT(11)"`
  60. WellCode string
  61. WellType string
  62. OrgCode string
  63. Well_Name string
  64. Scalar string
  65. Vector string
  66. CreateOn time.Time
  67. }
  68. type Channelslat struct {
  69. Id int `xorm:"not null pk INT(11)"`
  70. Unit string
  71. UnitSign string
  72. }
  73. type TriggerAction struct {
  74. To string `json:"tomail"`
  75. Subject string `json:"title"`
  76. Body string `json:"body"`
  77. }
  78. type TriggerActionSms struct {
  79. To string `json:"to"`
  80. Body string `json:"body"`
  81. }
  82. type Series struct {
  83. Name string `json:"name"`
  84. Columns []string `json:"columns"`
  85. Points [][]interface{} `json:"points"`
  86. }
  87. type UserInfo struct {
  88. Id int
  89. UserName string
  90. UserPassword string
  91. PublicKey string
  92. }
  93. //冲减
  94. type AccountInfo struct {
  95. Id int `xorm:"not null pk autoincr INT(11)" json:"id"`
  96. ProjectSourse string `xorm:"VARCHAR(50)" json:"sourse"`
  97. ProjectAccount string `xorm:"VARCHAR(50)" json:"account"`
  98. ProjectAccountName string `xorm:"VARCHAR(50)" json:"name"`
  99. ActionType string `xorm:"VARCHAR(50)" json:"type"`
  100. SurplusCount int `xorm:"INT(10)" json:"surplus"`
  101. StartTime time.Time `xorm:"DATETIME" json:"start"`
  102. EndTime time.Time `xorm:"DATETIME" json:"end"`
  103. CreateOn time.Time `xorm:"DATETIME created"`
  104. CreateUserId int `xorm:"INT(11)" form:"-" json:"-"`
  105. CreateBy string `xorm:"VARCHAR(50)"`
  106. ModifiedOn time.Time `xorm:"DATETIME updated" form:"-" json:"-"`
  107. ModifiedUserId int `xorm:"INT(11)" form:"-" json:"-"`
  108. ModifiedBy string `xorm:"VARCHAR(50)"`
  109. }