@@ -0,0 +1,27 @@
|
||||
package domain
|
||||
|
||||
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" }
|
||||
Reference in New Issue
Block a user