init: initial commit
Checks / verify (push) Canceled after 41s

This commit is contained in:
2026-10-06 11:24:02 +08:00
parent 456e87d4f2
commit ba6dfffab7
63 changed files with 7223 additions and 0 deletions
@@ -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" }
@@ -0,0 +1,15 @@
package domain
import "time"
// User maps explicitly to veyra_user. IDs are canonical UUID strings.
type User struct {
ID string `db:"id" json:"id"`
DisplayName string `db:"display_name" json:"display_name"`
Status string `db:"status" json:"status"`
Role string `db:"role" json:"-"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
}
func (User) TableName() string { return "veyra_user" }