21 lines
550 B
Go
21 lines
550 B
Go
package auth
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
type Session struct {
|
|
Id uint `gorm:"primary_key"`
|
|
CreatedAt time.Time `gorm:"column:created_at"`
|
|
UpdatedAt sql.NullTime `gorm:"column:updated_at"`
|
|
DeletedAt sql.NullTime `gorm:"column:deleted_at"`
|
|
UserUuid string `gorm:"column:user_uuid"`
|
|
RefreshUuid string `gorm:"column:refresh_uuid"`
|
|
SessionUuid string `gorm:"column:session_uuid"`
|
|
Expires time.Time `gorm:"column:expires"`
|
|
}
|
|
|
|
func (Session) TableName() string {
|
|
return "sessions"
|
|
}
|