完善更新记录以排查IP分配重复问题

This commit is contained in:
2025-08-21 18:34:30 +08:00
parent e2c87cfa8b
commit 7e7d706f84
5 changed files with 52 additions and 18 deletions

16
model/change-city.go Normal file
View 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"
}

View File

@@ -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"
}