123456789101112131415161718192021222324252627282930 |
- package dao
- import (
- "time"
- )
- type GatewayRelation struct {
- ID int `gorm:"type:int;primary_key"`
- LightControlCount int `gorm:"type:int;default 0"`
- InfoBoardCount int `gorm:"type:int;default 0"`
- OptoSensorCount int `gorm:"type:int;default 0"`
- ZigbeeCount int `gorm:"type:int;default 0"`
- AlarmTerminalCount int `gorm:"type:int;default 0"`
- CaptureUnitCount int `gorm:"type:int;default 0"`
- IpBroadcastCount int `gorm:"type:int;default 0"`
- Total int `gorm:"type:int;default 0"`
- TenantId int `gorm:"type:int" json:"tenantId"`
- CreateTime time.Time `gorm:"type:datetime" json:"createTime"`
- UpdateTime time.Time `gorm:"type:datetime" json:"updateTime"`
- IsDeleted int `gorm:"type:int;default 0" json:"isDeleted"`
- }
- func (GatewayRelation) TableName() string {
- return "t_dev_gateway_relation"
- }
- func (c *GatewayRelation) Get() error {
- return Db.Debug().Model(&c).Where("id = ?", c.ID).Find(&c).Error
- }
|