mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-09-10 06:41:29 +08:00
@@ -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)
|
||||
}
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user