28 lines
704 B
Go
28 lines
704 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Credential struct {
|
|
ID string `db:"id"`
|
|
UserID string `db:"user_id"`
|
|
LoginName string `db:"login_name"`
|
|
PasswordHash string `db:"password_hash" json:"-"`
|
|
CreatedAt time.Time `db:"created_at"`
|
|
}
|
|
|
|
func (Credential) TableName() string { return "veyra_credential" }
|
|
|
|
type Session struct {
|
|
ID string `db:"id"`
|
|
UserID string `db:"user_id"`
|
|
TokenHash string `db:"token_hash" json:"-"`
|
|
Audience string `db:"audience"`
|
|
ExpiresAt time.Time `db:"expires_at"`
|
|
RevokedAt *time.Time `db:"revoked_at"`
|
|
CreatedAt time.Time `db:"created_at"`
|
|
}
|
|
|
|
func (Session) TableName() string { return "veyra_session" }
|