完善更新记录以排查IP分配重复问题
This commit is contained in:
16
model/change-city.go
Normal file
16
model/change-city.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type ChangeCity struct {
|
||||
Id int `gorm:"column:id;primaryKey"`
|
||||
Time time.Time `gorm:"column:time"`
|
||||
CityId int `gorm:"column:city_id"`
|
||||
Count int `gorm:"column:count"`
|
||||
OffsetOld int `gorm:"column:offset_old"`
|
||||
OffsetNew int `gorm:"column:offset_new"`
|
||||
}
|
||||
|
||||
func (ChangeCity) TableName() string {
|
||||
return "change_city"
|
||||
}
|
||||
@@ -2,9 +2,10 @@ package model
|
||||
|
||||
import "time"
|
||||
|
||||
type Change struct {
|
||||
type ChangeEdge struct {
|
||||
Id int `gorm:"column:id;primaryKey"`
|
||||
Time time.Time `gorm:"column:time"`
|
||||
CityId int `gorm:"column:city"`
|
||||
Gateway string `gorm:"column:macaddr"`
|
||||
OldEdge string `gorm:"column:edge_old"`
|
||||
NewEdge string `gorm:"column:edge_new"`
|
||||
@@ -12,6 +13,6 @@ type Change struct {
|
||||
Info string `gorm:"column:info"`
|
||||
}
|
||||
|
||||
func (Change) TableName() string {
|
||||
func (ChangeEdge) TableName() string {
|
||||
return "change"
|
||||
}
|
||||
Reference in New Issue
Block a user