Files
scrabble-game/backend/internal/postgres/jet/backend/table/blocks.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

85 lines
2.3 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 Blocks = newBlocksTable("backend", "blocks", "")
type blocksTable struct {
postgres.Table
// Columns
BlockerID postgres.ColumnString
BlockedID postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type BlocksTable struct {
blocksTable
EXCLUDED blocksTable
}
// AS creates new BlocksTable with assigned alias
func (a BlocksTable) AS(alias string) *BlocksTable {
return newBlocksTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new BlocksTable with assigned schema name
func (a BlocksTable) FromSchema(schemaName string) *BlocksTable {
return newBlocksTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new BlocksTable with assigned table prefix
func (a BlocksTable) WithPrefix(prefix string) *BlocksTable {
return newBlocksTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new BlocksTable with assigned table suffix
func (a BlocksTable) WithSuffix(suffix string) *BlocksTable {
return newBlocksTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newBlocksTable(schemaName, tableName, alias string) *BlocksTable {
return &BlocksTable{
blocksTable: newBlocksTableImpl(schemaName, tableName, alias),
EXCLUDED: newBlocksTableImpl("", "excluded", ""),
}
}
func newBlocksTableImpl(schemaName, tableName, alias string) blocksTable {
var (
BlockerIDColumn = postgres.StringColumn("blocker_id")
BlockedIDColumn = postgres.StringColumn("blocked_id")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
allColumns = postgres.ColumnList{BlockerIDColumn, BlockedIDColumn, CreatedAtColumn}
mutableColumns = postgres.ColumnList{CreatedAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return blocksTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
BlockerID: BlockerIDColumn,
BlockedID: BlockedIDColumn,
CreatedAt: CreatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}