booth.go 792 B

12345678910111213141516171819
  1. package dao
  2. import "server/global"
  3. // Booth 岗亭模型
  4. type Booth struct {
  5. global.GVA_MODEL
  6. BoothCode string `gorm:"size:50;not null;uniqueIndex" json:"booth_code"` // 岗亭编码
  7. BoothName string `gorm:"size:100;not null" json:"booth_name"` // 岗亭名称
  8. IPAddress string `gorm:"size:50" json:"ip_address"` // IP地址
  9. Description string `gorm:"size:200" json:"description"` // 备注
  10. ParkingLotID uint `gorm:"index;comment:所属区域ID" json:"parking_lot_id"` // 所属区域ID
  11. ParkingLot *ParkingLot `gorm:"foreignkey:parking_lot_id" json:"parking_lot"`
  12. Channels []Channel `gorm:"foreignKey:BoothID" json:"channels"`
  13. }
  14. func (Booth) TableName() string {
  15. return "booth"
  16. }