model refactor

This commit is contained in:
nquidox 2025-09-09 23:17:41 +03:00
parent 42b53012dc
commit 0fdc00e2cc
3 changed files with 13 additions and 9 deletions

View file

@ -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"
}