Codes are stored as SHA-256 hashes and consumed with one conditional update, so concurrent use of the same code succeeds at most once. Refs #40 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
73 lines
1.2 KiB
Go
73 lines
1.2 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
|
|
package store
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Membership struct {
|
|
OrgID uuid.UUID
|
|
UserID uuid.UUID
|
|
IsOwner bool
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
type Org struct {
|
|
ID uuid.UUID
|
|
Slug string
|
|
Name string
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
RequireTotp bool
|
|
}
|
|
|
|
type RecoveryCode struct {
|
|
UserID uuid.UUID
|
|
CodeHash []byte
|
|
UsedAt *time.Time
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
type SsoProvider struct {
|
|
ID uuid.UUID
|
|
OrgID uuid.UUID
|
|
Name string
|
|
Issuer string
|
|
ClientID string
|
|
ClientSecret []byte
|
|
Scopes []string
|
|
AllowedDomains []string
|
|
AutoProvision bool
|
|
Enabled bool
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
type User struct {
|
|
ID uuid.UUID
|
|
Email string
|
|
DisplayName string
|
|
PasswordHash *string
|
|
DisabledAt *time.Time
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
TotpSecret []byte
|
|
TotpEnabledAt *time.Time
|
|
Locale *string
|
|
}
|
|
|
|
type UserIdentity struct {
|
|
ProviderID uuid.UUID
|
|
Subject string
|
|
OrgID uuid.UUID
|
|
UserID uuid.UUID
|
|
Email *string
|
|
CreatedAt time.Time
|
|
LastLoginAt time.Time
|
|
}
|