添加 submit 表记录每次提交配置;顺序排列提交配置

This commit is contained in:
2025-09-23 19:01:49 +08:00
parent d70bdaae16
commit 923ca32b98
4 changed files with 56 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ package model
type Config struct {
Id int `gorm:"column:id;primaryKey"`
GatewayMac string `gorm:"column:macaddr"`
Table string `gorm:"column:table"`
Table int `gorm:"column:table"`
EdgeMac string `gorm:"column:edge"`
Network string `gorm:"column:network"`
Cityhash string `gorm:"column:cityhash"`
@@ -55,4 +55,4 @@ type ConfigCreate struct {
func (ConfigCreate) TableName() string {
return "gateway"
}
}

14
model/submit.go Normal file
View File

@@ -0,0 +1,14 @@
package model
import "time"
type Submit struct {
Id int `gorm:"column:id;primaryKey"`
Time time.Time `gorm:"column:time"`
Gateway string `gorm:"column:gateway"`
Config string `gorm:"column:config"`
}
func (Submit) TableName() string {
return "submit"
}