Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinnrry committed Apr 15, 2024
1 parent ce39321 commit 6ecb61a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/models/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ func SyncTables() {
if err != nil {
panic(err)
}
err = db.Instance.Sync2(&Sessions{})
if err != nil {
panic(err)
}
}
11 changes: 11 additions & 0 deletions server/models/session.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package models

type Sessions struct {
Token string `xorm:"token char(43) not null pk " json:"token"`
Data string `xorm:"data blob" json:"data"`
Expiry int `xorm:"expiry timestamp index" json:"expiry"`
}

func (p *Sessions) TableName() string {
return "sessions"
}

0 comments on commit 6ecb61a

Please sign in to comment.