修改数据库表

This commit is contained in:
bjdgyc
2021-07-19 15:15:29 +08:00
parent 8ff77626d0
commit e4f959cb69
5 changed files with 94 additions and 46 deletions

View File

@@ -5,17 +5,17 @@ import (
"time"
)
type IpMap struct {
Id int `json:"id" xorm:"pk autoincr not null"`
IpAddr string `json:"ip_addr" xorm:"not null unique"`
MacAddr string `json:"mac_addr" xorm:"not null unique"`
Username string `json:"username"`
Keep bool `json:"keep"` // 保留 ip-mac 绑定
KeepTime time.Time `json:"keep_time"`
Note string `json:"note"` // 备注
LastLogin time.Time `json:"last_login"`
UpdatedAt time.Time `json:"updated_at"`
}
// type IpMap struct {
// Id int `json:"id" xorm:"pk autoincr not null"`
// IpAddr string `json:"ip_addr" xorm:"not null unique"`
// MacAddr string `json:"mac_addr" xorm:"not null unique"`
// Username string `json:"username"`
// Keep bool `json:"keep"` // 保留 ip-mac 绑定
// KeepTime time.Time `json:"keep_time"`
// Note string `json:"note"` // 备注
// LastLogin time.Time `json:"last_login"`
// UpdatedAt time.Time `json:"updated_at"`
// }
func SetIpMap(v *IpMap) error {
var err error