Files
scrabble-game/backend/internal/postgres/jet/backend/table/email_confirmations.go
T
Ilia Denisov bfa8797f8c
Tests · Go / test (push) Successful in 6s
Tests · Integration / integration (push) Successful in 9s
Tests · Go / test (pull_request) Successful in 6s
Tests · Integration / integration (pull_request) Successful in 9s
Stage 4: lobby & social (matchmaking, friends, blocks, chat+nudge, invitations, profile, email, multi-player drop-out)
Engine: multi-player drop-out-and-continue with a per-game tile disposition (remove default / return), resigned seats skipped and excluded from the win, leaver rack never revealed; 2-player behaviour unchanged.

New domains (service/store, no HTTP yet): internal/social (friend request/accept graph, per-user blocks, per-game chat with nudge as a message kind, content filter via mvdan.cc/xurls/v2 + leet/separator normaliser + phone heuristic) and internal/lobby (in-memory variant-keyed matchmaking pool, friend-game invitations invite->accept with lazy 7-day expiry). account gains profile editing and the email confirm-code flow (Mailer seam: SMTP or log mailer).

Migration 00003_social.sql + regenerated jet. main wires the new services into the server (accessors for the Stage 6 handlers); robot substitution stays in Stage 5, REST/stream/push in Stage 6/8. Docs (PLAN, ARCHITECTURE, FUNCTIONAL+ru, TESTING, README) updated.
2026-06-02 19:29:30 +02:00

100 lines
3.6 KiB
Go

//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//
package table
import (
"github.com/go-jet/jet/v2/postgres"
)
var EmailConfirmations = newEmailConfirmationsTable("backend", "email_confirmations", "")
type emailConfirmationsTable struct {
postgres.Table
// Columns
ConfirmationID postgres.ColumnString
AccountID postgres.ColumnString
Email postgres.ColumnString
CodeHash postgres.ColumnString
ExpiresAt postgres.ColumnTimestampz
Attempts postgres.ColumnInteger
ConsumedAt postgres.ColumnTimestampz
CreatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type EmailConfirmationsTable struct {
emailConfirmationsTable
EXCLUDED emailConfirmationsTable
}
// AS creates new EmailConfirmationsTable with assigned alias
func (a EmailConfirmationsTable) AS(alias string) *EmailConfirmationsTable {
return newEmailConfirmationsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new EmailConfirmationsTable with assigned schema name
func (a EmailConfirmationsTable) FromSchema(schemaName string) *EmailConfirmationsTable {
return newEmailConfirmationsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new EmailConfirmationsTable with assigned table prefix
func (a EmailConfirmationsTable) WithPrefix(prefix string) *EmailConfirmationsTable {
return newEmailConfirmationsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new EmailConfirmationsTable with assigned table suffix
func (a EmailConfirmationsTable) WithSuffix(suffix string) *EmailConfirmationsTable {
return newEmailConfirmationsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newEmailConfirmationsTable(schemaName, tableName, alias string) *EmailConfirmationsTable {
return &EmailConfirmationsTable{
emailConfirmationsTable: newEmailConfirmationsTableImpl(schemaName, tableName, alias),
EXCLUDED: newEmailConfirmationsTableImpl("", "excluded", ""),
}
}
func newEmailConfirmationsTableImpl(schemaName, tableName, alias string) emailConfirmationsTable {
var (
ConfirmationIDColumn = postgres.StringColumn("confirmation_id")
AccountIDColumn = postgres.StringColumn("account_id")
EmailColumn = postgres.StringColumn("email")
CodeHashColumn = postgres.StringColumn("code_hash")
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
AttemptsColumn = postgres.IntegerColumn("attempts")
ConsumedAtColumn = postgres.TimestampzColumn("consumed_at")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
allColumns = postgres.ColumnList{ConfirmationIDColumn, AccountIDColumn, EmailColumn, CodeHashColumn, ExpiresAtColumn, AttemptsColumn, ConsumedAtColumn, CreatedAtColumn}
mutableColumns = postgres.ColumnList{AccountIDColumn, EmailColumn, CodeHashColumn, ExpiresAtColumn, AttemptsColumn, ConsumedAtColumn, CreatedAtColumn}
defaultColumns = postgres.ColumnList{AttemptsColumn, CreatedAtColumn}
)
return emailConfirmationsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
ConfirmationID: ConfirmationIDColumn,
AccountID: AccountIDColumn,
Email: EmailColumn,
CodeHash: CodeHashColumn,
ExpiresAt: ExpiresAtColumn,
Attempts: AttemptsColumn,
ConsumedAt: ConsumedAtColumn,
CreatedAt: CreatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}