gateway.go 924 B

12345678910111213141516171819202122232425262728293031
  1. package app
  2. import (
  3. "lcfns/global"
  4. )
  5. type Gateway struct {
  6. global.GVA_MODEL
  7. Uid int `json:"uid" form:"uid" gorm:"column:uid;comment:所属用户名id;"`
  8. GatewayName string `json:"gatewayName" form:"gatewayName" gorm:"column:gateway_name"`
  9. Isn string `json:"isn" form:"isn" gorm:"column:isn;comment:内部sn;"`
  10. Osn string `json:"osn" form:"osn" gorm:"column:osn;comment:外部sn;"`
  11. //CreatedAt time.Time
  12. //DeletedAt time.Time
  13. State uint8 `json:"state" gorm:"column:state;comment:在线状态;"`
  14. IsDeleted uint8 `json:"isDeleted" gorm:"column:is_deleted"`
  15. Description string `json:"description" gorm:"column:description;comment:描述"`
  16. }
  17. // TableName Gateway 表名
  18. func (Gateway) TableName() string {
  19. return "gateway"
  20. }
  21. type Devices struct {
  22. Gid uint `json:"gid"`
  23. Osn string `json:"osn"`
  24. Cid uint `json:"cid"`
  25. Csn string `json:"csn"`
  26. Iid uint `json:"iid"`
  27. }