建立仓库
This commit is contained in:
41
model/config.go
Normal file
41
model/config.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package model
|
||||
|
||||
type Config struct {
|
||||
Id int `gorm:"column:id;primaryKey"`
|
||||
GatewayMac string `gorm:"column:macaddr"`
|
||||
Table string `gorm:"column:table"`
|
||||
Macaddr string `gorm:"column:edge"`
|
||||
Network string `gorm:"column:network"`
|
||||
Cityhash string `gorm:"column:cityhash"`
|
||||
CityLabel string `gorm:"column:label"`
|
||||
User string `gorm:"column:user"`
|
||||
InnerIp string `gorm:"column:inner_ip"`
|
||||
IsChange int `gorm:"column:ischange"`
|
||||
IsOnline int `gorm:"column:isonline"`
|
||||
OnlineNum int `gorm:"column:onlinenum"`
|
||||
CreateTime string `gorm:"column:createtime"`
|
||||
UpdateTime string `gorm:"column:updatetime"`
|
||||
}
|
||||
|
||||
func (Config) TableName() string {
|
||||
return "gateway"
|
||||
}
|
||||
|
||||
type ConfigUpdate struct {
|
||||
Id int `gorm:"column:id;primaryKey"`
|
||||
GatewayMac *string `gorm:"column:macaddr"`
|
||||
Table *string `gorm:"column:table"`
|
||||
Macaddr *string `gorm:"column:edge"`
|
||||
Network *string `gorm:"column:network"`
|
||||
Cityhash *string `gorm:"column:cityhash"`
|
||||
CityLabel *string `gorm:"column:label"`
|
||||
User *string `gorm:"column:user"`
|
||||
InnerIp *string `gorm:"column:inner_ip"`
|
||||
IsChange *int `gorm:"column:ischange"`
|
||||
IsOnline *int `gorm:"column:isonline"`
|
||||
OnlineNum *int `gorm:"column:onlinenum"`
|
||||
}
|
||||
|
||||
func (ConfigUpdate) TableName() string {
|
||||
return "gateway"
|
||||
}
|
||||
Reference in New Issue
Block a user