Merge pull request #360 from kdsun/dev

Dev
This commit is contained in:
bjdgyc
2025-04-08 11:18:21 +08:00
committed by GitHub
9 changed files with 14232 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ func initDb() {
}
// 初始化数据库
err = xdb.Sync2(&User{}, &Setting{}, &Group{}, &IpMap{}, &AccessAudit{}, &Policy{}, &StatsNetwork{}, &StatsCpu{}, &StatsMem{}, &StatsOnline{}, &UserActLog{})
err = xdb.Sync2(&User{}, &Setting{}, &Group{}, &IpMap{}, &AccessAudit{}, &Policy{}, &StatsNetwork{}, &StatsCpu{}, &StatsMem{}, &StatsOnline{}, &UserActLog{}, &PasswordReset{})
if err != nil {
base.Fatal(err)
}

View File

@@ -118,3 +118,9 @@ type StatsMem struct {
Percent float64 `json:"percent" xorm:"Float"`
CreatedAt time.Time `json:"created_at" xorm:"DateTime created index"`
}
type PasswordReset struct {
Token string `json:"token" xorm:"varchar(60) not null unique"`
UserId int `json:"id" xorm:"not null"`
ExpiresAt int `json:"expires_at" xorm:"not null"`
}