camera.go 1.2 KB

123456789101112131415161718192021
  1. package app
  2. import "lc-fangdaosha/global"
  3. // 摄像机 结构体 Camera
  4. type Camera struct {
  5. global.GVA_MODEL
  6. Name string `json:"name" form:"name" gorm:"column:name;comment:摄像机名称;"` //摄像机名称
  7. Gid uint `json:"gid" form:"gid" gorm:"column:gid;comment:网关id;size:unit;"` //网关id
  8. SN string `json:"sn" form:"sn" gorm:"column:sn;comment:摄像机序列号;"` //摄像机序列号
  9. MacAddress string `json:"macAddress" form:"macAddress" gorm:"column:mac_address;comment:摄像机地址;"` //摄像机地址
  10. IsDeleted uint `json:"isDeleted" form:"isDeleted" gorm:"column:is_deleted;comment:是否已删除;size:unit;"` //是否已删除
  11. IsRegisted uint `json:"isRegisted" form:"isRegisted" gorm:"column:is_registed;comment:是否已注册;size:unit;"` //是否已注册
  12. StreamId string `json:"streamId" form:"streamId" gorm:"column:stream_id;comment:流id;"` //流id
  13. StreamUrl string `json:"streamUrl" form:"streamUrl" gorm:"column:stream_url;comment:流地址;"` //流地址
  14. }
  15. // TableName 摄像机 Camera自定义表名 camera
  16. func (Camera) TableName() string {
  17. return "camera"
  18. }