model refactor
This commit is contained in:
parent
42b53012dc
commit
0fdc00e2cc
3 changed files with 13 additions and 9 deletions
|
|
@ -5,7 +5,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
type RefreshToken struct {
|
||||
type Session struct {
|
||||
Id uint `gorm:"primary_key"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt sql.NullTime `gorm:"column:updated_at"`
|
||||
|
|
@ -15,3 +15,7 @@ type RefreshToken struct {
|
|||
SessionUuid string `gorm:"column:session_uuid"`
|
||||
Expires time.Time `gorm:"column:expires"`
|
||||
}
|
||||
|
||||
func (Session) TableName() string {
|
||||
return "sessions"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue