gateway.go 1.1 KB

1234567891011121314151617181920212223242526
  1. package app
  2. import "lc-fangdaosha/global"
  3. // 网关 结构体 Gateway
  4. type Gateway struct {
  5. global.GVA_MODEL
  6. Uid int `json:"uid" form:"uid" gorm:"column:uid;comment:用户id;"` //用户id
  7. GatewayName string `json:"gatewayName" form:"gatewayName" gorm:"column:gateway_name;comment:网关名称;"` //网关名称
  8. Isn string `json:"isn" form:"isn" gorm:"column:isn;comment:内部序列号;"` //内部序列号
  9. Osn string `json:"osn" form:"osn" gorm:"column:osn;comment:外部序列号;"` //外部序列号
  10. IsDeleted int `json:"isDeleted" form:"isDeleted" gorm:"column:is_deleted;comment:是否已删除;"` //是否已删除
  11. Description string `json:"description" form:"description" gorm:"column:description;comment:描述;"` //描述
  12. }
  13. // TableName 网关 Gateway自定义表名 gateway
  14. func (Gateway) TableName() string {
  15. return "gateway"
  16. }
  17. type Devices struct {
  18. Gid uint `json:"gid"`
  19. Osn string `json:"osn"`
  20. Cid uint `json:"cid"`
  21. Csn string `json:"csn"`
  22. }