2025-08-05 10:51:35 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
|
Id int `gorm:"column:id;primaryKey"`
|
|
|
|
|
GatewayMac string `gorm:"column:macaddr"`
|
2025-09-23 19:01:49 +08:00
|
|
|
Table int `gorm:"column:table"`
|
2025-09-11 00:08:11 +08:00
|
|
|
EdgeMac string `gorm:"column:edge"`
|
2025-08-05 10:51:35 +08:00
|
|
|
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"`
|
2025-09-11 00:08:11 +08:00
|
|
|
EdgeMac *string `gorm:"column:edge"`
|
2025-08-05 10:51:35 +08:00
|
|
|
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"
|
|
|
|
|
}
|
2025-09-11 14:40:11 +08:00
|
|
|
|
|
|
|
|
type ConfigCreate struct {
|
|
|
|
|
GatewayMac *string `gorm:"column:macaddr"`
|
|
|
|
|
Table *string `gorm:"column:table"`
|
|
|
|
|
EdgeMac *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"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (ConfigCreate) TableName() string {
|
|
|
|
|
return "gateway"
|
2025-09-23 19:01:49 +08:00
|
|
|
}
|