feat: backend service

This commit is contained in:
Ilia Denisov
2026-05-06 10:14:55 +03:00
committed by GitHub
parent 3e2622757e
commit f446c6a2ac
1486 changed files with 49720 additions and 266401 deletions
@@ -0,0 +1,29 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type Accounts struct {
UserID uuid.UUID `sql:"primary_key"`
Email string
UserName string
DisplayName string
PreferredLanguage string
TimeZone string
DeclaredCountry *string
PermanentBlock bool
DeletedActorType *string
DeletedActorID *string
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
}
@@ -0,0 +1,20 @@
//
// 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 model
import (
"time"
)
type AdminAccounts struct {
Username string `sql:"primary_key"`
PasswordHash []byte
CreatedAt time.Time
LastUsedAt *time.Time
DisabledAt *time.Time
}
@@ -0,0 +1,23 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type Applications struct {
ApplicationID uuid.UUID `sql:"primary_key"`
GameID uuid.UUID
ApplicantUserID uuid.UUID
RaceName string
Status string
CreatedAt time.Time
DecidedAt *time.Time
}
@@ -0,0 +1,24 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type AuthChallenges struct {
ChallengeID uuid.UUID `sql:"primary_key"`
Email string
CodeHash []byte
Attempts int32
CreatedAt time.Time
ExpiresAt time.Time
ConsumedAt *time.Time
PreferredLanguage string
}
@@ -0,0 +1,18 @@
//
// 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 model
import (
"time"
)
type BlockedEmails struct {
Email string `sql:"primary_key"`
Reason string
BlockedAt time.Time
}
@@ -0,0 +1,23 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type DeviceSessions struct {
DeviceSessionID uuid.UUID `sql:"primary_key"`
UserID uuid.UUID
ClientPublicKey []byte
Status string
CreatedAt time.Time
LastSeenAt *time.Time
RevokedAt *time.Time
}
@@ -0,0 +1,20 @@
//
// 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 model
import (
"time"
)
type EngineVersions struct {
Version string `sql:"primary_key"`
ImageRef string
Enabled bool
CreatedAt time.Time
UpdatedAt time.Time
}
@@ -0,0 +1,27 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type EntitlementRecords struct {
RecordID uuid.UUID `sql:"primary_key"`
UserID uuid.UUID
Tier string
IsPaid bool
Source string
ActorType string
ActorID *string
ReasonCode string
StartsAt time.Time
EndsAt *time.Time
CreatedAt time.Time
}
@@ -0,0 +1,27 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type EntitlementSnapshots struct {
UserID uuid.UUID `sql:"primary_key"`
Tier string
IsPaid bool
Source string
ActorType string
ActorID *string
ReasonCode string
StartsAt time.Time
EndsAt *time.Time
MaxRegisteredRaceNames int32
UpdatedAt time.Time
}
@@ -0,0 +1,35 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type Games struct {
GameID uuid.UUID `sql:"primary_key"`
OwnerUserID *uuid.UUID
Visibility string
Status string
GameName string
Description string
MinPlayers int32
MaxPlayers int32
StartGapHours int32
StartGapPlayers int32
EnrollmentEndsAt time.Time
TurnSchedule string
TargetEngineVersion string
RuntimeSnapshot string
RuntimeBinding *string
CreatedAt time.Time
UpdatedAt time.Time
StartedAt *time.Time
FinishedAt *time.Time
}
@@ -0,0 +1,26 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type Invites struct {
InviteID uuid.UUID `sql:"primary_key"`
GameID uuid.UUID
InviterUserID uuid.UUID
InvitedUserID *uuid.UUID
Code *string
Status string
RaceName string
CreatedAt time.Time
ExpiresAt time.Time
DecidedAt *time.Time
}
@@ -0,0 +1,19 @@
//
// 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 model
import (
"github.com/google/uuid"
)
type LimitActive struct {
UserID uuid.UUID `sql:"primary_key"`
LimitCode string `sql:"primary_key"`
RecordID uuid.UUID
Value int32
}
@@ -0,0 +1,29 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type LimitRecords struct {
RecordID uuid.UUID `sql:"primary_key"`
UserID uuid.UUID
LimitCode string
Value int32
ReasonCode string
ActorType string
ActorID *string
AppliedAt time.Time
ExpiresAt *time.Time
RemovedAt *time.Time
RemovedByType *string
RemovedByID *string
RemovedReasonCode *string
}
@@ -0,0 +1,23 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type MailAttempts struct {
AttemptID uuid.UUID `sql:"primary_key"`
DeliveryID uuid.UUID
AttemptNo int32
StartedAt time.Time
FinishedAt *time.Time
Outcome string
Error string
}
@@ -0,0 +1,20 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type MailDeadLetters struct {
DeadLetterID uuid.UUID `sql:"primary_key"`
DeliveryID uuid.UUID
ArchivedAt time.Time
Reason string
}
@@ -0,0 +1,28 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type MailDeliveries struct {
DeliveryID uuid.UUID `sql:"primary_key"`
TemplateID string
IdempotencyKey string
Status string
Attempts int32
NextAttemptAt *time.Time
PayloadID uuid.UUID
LastError string
CreatedAt time.Time
UpdatedAt time.Time
SentAt *time.Time
DeadLetteredAt *time.Time
}
@@ -0,0 +1,21 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type MailPayloads struct {
PayloadID uuid.UUID `sql:"primary_key"`
ContentType string
Subject *string
Body []byte
CreatedAt time.Time
}
@@ -0,0 +1,19 @@
//
// 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 model
import (
"github.com/google/uuid"
)
type MailRecipients struct {
RecipientID uuid.UUID `sql:"primary_key"`
DeliveryID uuid.UUID
Address string
Kind string
}
@@ -0,0 +1,24 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type Memberships struct {
MembershipID uuid.UUID `sql:"primary_key"`
GameID uuid.UUID
UserID uuid.UUID
RaceName string
CanonicalKey string
Status string
JoinedAt time.Time
RemovedAt *time.Time
}
@@ -0,0 +1,21 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type NotificationDeadLetters struct {
DeadLetterID uuid.UUID `sql:"primary_key"`
NotificationID uuid.UUID
RouteID uuid.UUID
ArchivedAt time.Time
Reason string
}
@@ -0,0 +1,20 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type NotificationMalformedIntents struct {
ID uuid.UUID `sql:"primary_key"`
ReceivedAt time.Time
Payload string
Reason string
}
@@ -0,0 +1,32 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type NotificationRoutes struct {
RouteID uuid.UUID `sql:"primary_key"`
NotificationID uuid.UUID
Channel string
Status string
Attempts int32
MaxAttempts int32
NextAttemptAt *time.Time
LastAttemptAt *time.Time
LastError string
ResolvedEmail string
ResolvedLocale string
CreatedAt time.Time
UpdatedAt time.Time
PublishedAt *time.Time
DeadLetteredAt *time.Time
SkippedAt *time.Time
}
@@ -0,0 +1,22 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type Notifications struct {
NotificationID uuid.UUID `sql:"primary_key"`
Kind string
IdempotencyKey string
UserID *uuid.UUID
Payload *string
CreatedAt time.Time
}
@@ -0,0 +1,21 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type PlayerMappings struct {
GameID uuid.UUID `sql:"primary_key"`
UserID uuid.UUID `sql:"primary_key"`
RaceName string
EnginePlayerUUID uuid.UUID
CreatedAt time.Time
}
@@ -0,0 +1,25 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type RaceNames struct {
Name string
Canonical string `sql:"primary_key"`
Status string
OwnerUserID uuid.UUID
GameID uuid.UUID `sql:"primary_key"`
SourceGameID *uuid.UUID
ReservedAt *time.Time
ExpiresAt *time.Time
RegisteredAt *time.Time
}
@@ -0,0 +1,20 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type RuntimeHealthSnapshots struct {
SnapshotID uuid.UUID `sql:"primary_key"`
GameID uuid.UUID
ObservedAt time.Time
Payload string
}
@@ -0,0 +1,27 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type RuntimeOperationLog struct {
OperationID uuid.UUID `sql:"primary_key"`
GameID uuid.UUID
Op string
Source string
Status string
ImageRef string
ContainerID string
ErrorCode string
ErrorMessage string
StartedAt time.Time
FinishedAt *time.Time
}
@@ -0,0 +1,38 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type RuntimeRecords struct {
GameID uuid.UUID `sql:"primary_key"`
Status string
CurrentContainerID *string
CurrentImageRef *string
CurrentEngineVersion *string
EngineEndpoint string
StatePath *string
DockerNetwork *string
TurnSchedule string
CurrentTurn int32
NextGenerationAt *time.Time
SkipNextTick bool
Paused bool
PausedAt *time.Time
EngineHealth string
CreatedAt time.Time
UpdatedAt time.Time
StartedAt *time.Time
StoppedAt *time.Time
FinishedAt *time.Time
RemovedAt *time.Time
LastObservedAt *time.Time
}
@@ -0,0 +1,18 @@
//
// 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 model
import (
"github.com/google/uuid"
)
type SanctionActive struct {
UserID uuid.UUID `sql:"primary_key"`
SanctionCode string `sql:"primary_key"`
RecordID uuid.UUID
}
@@ -0,0 +1,29 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type SanctionRecords struct {
RecordID uuid.UUID `sql:"primary_key"`
UserID uuid.UUID
SanctionCode string
Scope string
ReasonCode string
ActorType string
ActorID *string
AppliedAt time.Time
ExpiresAt *time.Time
RemovedAt *time.Time
RemovedByType *string
RemovedByID *string
RemovedReasonCode *string
}
@@ -0,0 +1,20 @@
//
// 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 model
import (
"github.com/google/uuid"
"time"
)
type UserCountryCounters struct {
UserID uuid.UUID `sql:"primary_key"`
Country string `sql:"primary_key"`
Count int64
LastSeenAt *time.Time
}
@@ -0,0 +1,114 @@
//
// 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 Accounts = newAccountsTable("backend", "accounts", "")
type accountsTable struct {
postgres.Table
// Columns
UserID postgres.ColumnString
Email postgres.ColumnString
UserName postgres.ColumnString
DisplayName postgres.ColumnString
PreferredLanguage postgres.ColumnString
TimeZone postgres.ColumnString
DeclaredCountry postgres.ColumnString
PermanentBlock postgres.ColumnBool
DeletedActorType postgres.ColumnString
DeletedActorID postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
UpdatedAt postgres.ColumnTimestampz
DeletedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type AccountsTable struct {
accountsTable
EXCLUDED accountsTable
}
// AS creates new AccountsTable with assigned alias
func (a AccountsTable) AS(alias string) *AccountsTable {
return newAccountsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new AccountsTable with assigned schema name
func (a AccountsTable) FromSchema(schemaName string) *AccountsTable {
return newAccountsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new AccountsTable with assigned table prefix
func (a AccountsTable) WithPrefix(prefix string) *AccountsTable {
return newAccountsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new AccountsTable with assigned table suffix
func (a AccountsTable) WithSuffix(suffix string) *AccountsTable {
return newAccountsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newAccountsTable(schemaName, tableName, alias string) *AccountsTable {
return &AccountsTable{
accountsTable: newAccountsTableImpl(schemaName, tableName, alias),
EXCLUDED: newAccountsTableImpl("", "excluded", ""),
}
}
func newAccountsTableImpl(schemaName, tableName, alias string) accountsTable {
var (
UserIDColumn = postgres.StringColumn("user_id")
EmailColumn = postgres.StringColumn("email")
UserNameColumn = postgres.StringColumn("user_name")
DisplayNameColumn = postgres.StringColumn("display_name")
PreferredLanguageColumn = postgres.StringColumn("preferred_language")
TimeZoneColumn = postgres.StringColumn("time_zone")
DeclaredCountryColumn = postgres.StringColumn("declared_country")
PermanentBlockColumn = postgres.BoolColumn("permanent_block")
DeletedActorTypeColumn = postgres.StringColumn("deleted_actor_type")
DeletedActorIDColumn = postgres.StringColumn("deleted_actor_id")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
DeletedAtColumn = postgres.TimestampzColumn("deleted_at")
allColumns = postgres.ColumnList{UserIDColumn, EmailColumn, UserNameColumn, DisplayNameColumn, PreferredLanguageColumn, TimeZoneColumn, DeclaredCountryColumn, PermanentBlockColumn, DeletedActorTypeColumn, DeletedActorIDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn}
mutableColumns = postgres.ColumnList{EmailColumn, UserNameColumn, DisplayNameColumn, PreferredLanguageColumn, TimeZoneColumn, DeclaredCountryColumn, PermanentBlockColumn, DeletedActorTypeColumn, DeletedActorIDColumn, CreatedAtColumn, UpdatedAtColumn, DeletedAtColumn}
defaultColumns = postgres.ColumnList{DisplayNameColumn, PermanentBlockColumn, CreatedAtColumn, UpdatedAtColumn}
)
return accountsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
UserID: UserIDColumn,
Email: EmailColumn,
UserName: UserNameColumn,
DisplayName: DisplayNameColumn,
PreferredLanguage: PreferredLanguageColumn,
TimeZone: TimeZoneColumn,
DeclaredCountry: DeclaredCountryColumn,
PermanentBlock: PermanentBlockColumn,
DeletedActorType: DeletedActorTypeColumn,
DeletedActorID: DeletedActorIDColumn,
CreatedAt: CreatedAtColumn,
UpdatedAt: UpdatedAtColumn,
DeletedAt: DeletedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,90 @@
//
// 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 AdminAccounts = newAdminAccountsTable("backend", "admin_accounts", "")
type adminAccountsTable struct {
postgres.Table
// Columns
Username postgres.ColumnString
PasswordHash postgres.ColumnBytea
CreatedAt postgres.ColumnTimestampz
LastUsedAt postgres.ColumnTimestampz
DisabledAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type AdminAccountsTable struct {
adminAccountsTable
EXCLUDED adminAccountsTable
}
// AS creates new AdminAccountsTable with assigned alias
func (a AdminAccountsTable) AS(alias string) *AdminAccountsTable {
return newAdminAccountsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new AdminAccountsTable with assigned schema name
func (a AdminAccountsTable) FromSchema(schemaName string) *AdminAccountsTable {
return newAdminAccountsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new AdminAccountsTable with assigned table prefix
func (a AdminAccountsTable) WithPrefix(prefix string) *AdminAccountsTable {
return newAdminAccountsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new AdminAccountsTable with assigned table suffix
func (a AdminAccountsTable) WithSuffix(suffix string) *AdminAccountsTable {
return newAdminAccountsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newAdminAccountsTable(schemaName, tableName, alias string) *AdminAccountsTable {
return &AdminAccountsTable{
adminAccountsTable: newAdminAccountsTableImpl(schemaName, tableName, alias),
EXCLUDED: newAdminAccountsTableImpl("", "excluded", ""),
}
}
func newAdminAccountsTableImpl(schemaName, tableName, alias string) adminAccountsTable {
var (
UsernameColumn = postgres.StringColumn("username")
PasswordHashColumn = postgres.ByteaColumn("password_hash")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
LastUsedAtColumn = postgres.TimestampzColumn("last_used_at")
DisabledAtColumn = postgres.TimestampzColumn("disabled_at")
allColumns = postgres.ColumnList{UsernameColumn, PasswordHashColumn, CreatedAtColumn, LastUsedAtColumn, DisabledAtColumn}
mutableColumns = postgres.ColumnList{PasswordHashColumn, CreatedAtColumn, LastUsedAtColumn, DisabledAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return adminAccountsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
Username: UsernameColumn,
PasswordHash: PasswordHashColumn,
CreatedAt: CreatedAtColumn,
LastUsedAt: LastUsedAtColumn,
DisabledAt: DisabledAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,96 @@
//
// 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 Applications = newApplicationsTable("backend", "applications", "")
type applicationsTable struct {
postgres.Table
// Columns
ApplicationID postgres.ColumnString
GameID postgres.ColumnString
ApplicantUserID postgres.ColumnString
RaceName postgres.ColumnString
Status postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
DecidedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type ApplicationsTable struct {
applicationsTable
EXCLUDED applicationsTable
}
// AS creates new ApplicationsTable with assigned alias
func (a ApplicationsTable) AS(alias string) *ApplicationsTable {
return newApplicationsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new ApplicationsTable with assigned schema name
func (a ApplicationsTable) FromSchema(schemaName string) *ApplicationsTable {
return newApplicationsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new ApplicationsTable with assigned table prefix
func (a ApplicationsTable) WithPrefix(prefix string) *ApplicationsTable {
return newApplicationsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new ApplicationsTable with assigned table suffix
func (a ApplicationsTable) WithSuffix(suffix string) *ApplicationsTable {
return newApplicationsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newApplicationsTable(schemaName, tableName, alias string) *ApplicationsTable {
return &ApplicationsTable{
applicationsTable: newApplicationsTableImpl(schemaName, tableName, alias),
EXCLUDED: newApplicationsTableImpl("", "excluded", ""),
}
}
func newApplicationsTableImpl(schemaName, tableName, alias string) applicationsTable {
var (
ApplicationIDColumn = postgres.StringColumn("application_id")
GameIDColumn = postgres.StringColumn("game_id")
ApplicantUserIDColumn = postgres.StringColumn("applicant_user_id")
RaceNameColumn = postgres.StringColumn("race_name")
StatusColumn = postgres.StringColumn("status")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
DecidedAtColumn = postgres.TimestampzColumn("decided_at")
allColumns = postgres.ColumnList{ApplicationIDColumn, GameIDColumn, ApplicantUserIDColumn, RaceNameColumn, StatusColumn, CreatedAtColumn, DecidedAtColumn}
mutableColumns = postgres.ColumnList{GameIDColumn, ApplicantUserIDColumn, RaceNameColumn, StatusColumn, CreatedAtColumn, DecidedAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return applicationsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
ApplicationID: ApplicationIDColumn,
GameID: GameIDColumn,
ApplicantUserID: ApplicantUserIDColumn,
RaceName: RaceNameColumn,
Status: StatusColumn,
CreatedAt: CreatedAtColumn,
DecidedAt: DecidedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,99 @@
//
// 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 AuthChallenges = newAuthChallengesTable("backend", "auth_challenges", "")
type authChallengesTable struct {
postgres.Table
// Columns
ChallengeID postgres.ColumnString
Email postgres.ColumnString
CodeHash postgres.ColumnBytea
Attempts postgres.ColumnInteger
CreatedAt postgres.ColumnTimestampz
ExpiresAt postgres.ColumnTimestampz
ConsumedAt postgres.ColumnTimestampz
PreferredLanguage postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type AuthChallengesTable struct {
authChallengesTable
EXCLUDED authChallengesTable
}
// AS creates new AuthChallengesTable with assigned alias
func (a AuthChallengesTable) AS(alias string) *AuthChallengesTable {
return newAuthChallengesTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new AuthChallengesTable with assigned schema name
func (a AuthChallengesTable) FromSchema(schemaName string) *AuthChallengesTable {
return newAuthChallengesTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new AuthChallengesTable with assigned table prefix
func (a AuthChallengesTable) WithPrefix(prefix string) *AuthChallengesTable {
return newAuthChallengesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new AuthChallengesTable with assigned table suffix
func (a AuthChallengesTable) WithSuffix(suffix string) *AuthChallengesTable {
return newAuthChallengesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newAuthChallengesTable(schemaName, tableName, alias string) *AuthChallengesTable {
return &AuthChallengesTable{
authChallengesTable: newAuthChallengesTableImpl(schemaName, tableName, alias),
EXCLUDED: newAuthChallengesTableImpl("", "excluded", ""),
}
}
func newAuthChallengesTableImpl(schemaName, tableName, alias string) authChallengesTable {
var (
ChallengeIDColumn = postgres.StringColumn("challenge_id")
EmailColumn = postgres.StringColumn("email")
CodeHashColumn = postgres.ByteaColumn("code_hash")
AttemptsColumn = postgres.IntegerColumn("attempts")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
ConsumedAtColumn = postgres.TimestampzColumn("consumed_at")
PreferredLanguageColumn = postgres.StringColumn("preferred_language")
allColumns = postgres.ColumnList{ChallengeIDColumn, EmailColumn, CodeHashColumn, AttemptsColumn, CreatedAtColumn, ExpiresAtColumn, ConsumedAtColumn, PreferredLanguageColumn}
mutableColumns = postgres.ColumnList{EmailColumn, CodeHashColumn, AttemptsColumn, CreatedAtColumn, ExpiresAtColumn, ConsumedAtColumn, PreferredLanguageColumn}
defaultColumns = postgres.ColumnList{AttemptsColumn, CreatedAtColumn, PreferredLanguageColumn}
)
return authChallengesTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
ChallengeID: ChallengeIDColumn,
Email: EmailColumn,
CodeHash: CodeHashColumn,
Attempts: AttemptsColumn,
CreatedAt: CreatedAtColumn,
ExpiresAt: ExpiresAtColumn,
ConsumedAt: ConsumedAtColumn,
PreferredLanguage: PreferredLanguageColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,84 @@
//
// 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 BlockedEmails = newBlockedEmailsTable("backend", "blocked_emails", "")
type blockedEmailsTable struct {
postgres.Table
// Columns
Email postgres.ColumnString
Reason postgres.ColumnString
BlockedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type BlockedEmailsTable struct {
blockedEmailsTable
EXCLUDED blockedEmailsTable
}
// AS creates new BlockedEmailsTable with assigned alias
func (a BlockedEmailsTable) AS(alias string) *BlockedEmailsTable {
return newBlockedEmailsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new BlockedEmailsTable with assigned schema name
func (a BlockedEmailsTable) FromSchema(schemaName string) *BlockedEmailsTable {
return newBlockedEmailsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new BlockedEmailsTable with assigned table prefix
func (a BlockedEmailsTable) WithPrefix(prefix string) *BlockedEmailsTable {
return newBlockedEmailsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new BlockedEmailsTable with assigned table suffix
func (a BlockedEmailsTable) WithSuffix(suffix string) *BlockedEmailsTable {
return newBlockedEmailsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newBlockedEmailsTable(schemaName, tableName, alias string) *BlockedEmailsTable {
return &BlockedEmailsTable{
blockedEmailsTable: newBlockedEmailsTableImpl(schemaName, tableName, alias),
EXCLUDED: newBlockedEmailsTableImpl("", "excluded", ""),
}
}
func newBlockedEmailsTableImpl(schemaName, tableName, alias string) blockedEmailsTable {
var (
EmailColumn = postgres.StringColumn("email")
ReasonColumn = postgres.StringColumn("reason")
BlockedAtColumn = postgres.TimestampzColumn("blocked_at")
allColumns = postgres.ColumnList{EmailColumn, ReasonColumn, BlockedAtColumn}
mutableColumns = postgres.ColumnList{ReasonColumn, BlockedAtColumn}
defaultColumns = postgres.ColumnList{BlockedAtColumn}
)
return blockedEmailsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
Email: EmailColumn,
Reason: ReasonColumn,
BlockedAt: BlockedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,96 @@
//
// 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 DeviceSessions = newDeviceSessionsTable("backend", "device_sessions", "")
type deviceSessionsTable struct {
postgres.Table
// Columns
DeviceSessionID postgres.ColumnString
UserID postgres.ColumnString
ClientPublicKey postgres.ColumnBytea
Status postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
LastSeenAt postgres.ColumnTimestampz
RevokedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type DeviceSessionsTable struct {
deviceSessionsTable
EXCLUDED deviceSessionsTable
}
// AS creates new DeviceSessionsTable with assigned alias
func (a DeviceSessionsTable) AS(alias string) *DeviceSessionsTable {
return newDeviceSessionsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new DeviceSessionsTable with assigned schema name
func (a DeviceSessionsTable) FromSchema(schemaName string) *DeviceSessionsTable {
return newDeviceSessionsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new DeviceSessionsTable with assigned table prefix
func (a DeviceSessionsTable) WithPrefix(prefix string) *DeviceSessionsTable {
return newDeviceSessionsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new DeviceSessionsTable with assigned table suffix
func (a DeviceSessionsTable) WithSuffix(suffix string) *DeviceSessionsTable {
return newDeviceSessionsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newDeviceSessionsTable(schemaName, tableName, alias string) *DeviceSessionsTable {
return &DeviceSessionsTable{
deviceSessionsTable: newDeviceSessionsTableImpl(schemaName, tableName, alias),
EXCLUDED: newDeviceSessionsTableImpl("", "excluded", ""),
}
}
func newDeviceSessionsTableImpl(schemaName, tableName, alias string) deviceSessionsTable {
var (
DeviceSessionIDColumn = postgres.StringColumn("device_session_id")
UserIDColumn = postgres.StringColumn("user_id")
ClientPublicKeyColumn = postgres.ByteaColumn("client_public_key")
StatusColumn = postgres.StringColumn("status")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
LastSeenAtColumn = postgres.TimestampzColumn("last_seen_at")
RevokedAtColumn = postgres.TimestampzColumn("revoked_at")
allColumns = postgres.ColumnList{DeviceSessionIDColumn, UserIDColumn, ClientPublicKeyColumn, StatusColumn, CreatedAtColumn, LastSeenAtColumn, RevokedAtColumn}
mutableColumns = postgres.ColumnList{UserIDColumn, ClientPublicKeyColumn, StatusColumn, CreatedAtColumn, LastSeenAtColumn, RevokedAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return deviceSessionsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
DeviceSessionID: DeviceSessionIDColumn,
UserID: UserIDColumn,
ClientPublicKey: ClientPublicKeyColumn,
Status: StatusColumn,
CreatedAt: CreatedAtColumn,
LastSeenAt: LastSeenAtColumn,
RevokedAt: RevokedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,90 @@
//
// 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 EngineVersions = newEngineVersionsTable("backend", "engine_versions", "")
type engineVersionsTable struct {
postgres.Table
// Columns
Version postgres.ColumnString
ImageRef postgres.ColumnString
Enabled postgres.ColumnBool
CreatedAt postgres.ColumnTimestampz
UpdatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type EngineVersionsTable struct {
engineVersionsTable
EXCLUDED engineVersionsTable
}
// AS creates new EngineVersionsTable with assigned alias
func (a EngineVersionsTable) AS(alias string) *EngineVersionsTable {
return newEngineVersionsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new EngineVersionsTable with assigned schema name
func (a EngineVersionsTable) FromSchema(schemaName string) *EngineVersionsTable {
return newEngineVersionsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new EngineVersionsTable with assigned table prefix
func (a EngineVersionsTable) WithPrefix(prefix string) *EngineVersionsTable {
return newEngineVersionsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new EngineVersionsTable with assigned table suffix
func (a EngineVersionsTable) WithSuffix(suffix string) *EngineVersionsTable {
return newEngineVersionsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newEngineVersionsTable(schemaName, tableName, alias string) *EngineVersionsTable {
return &EngineVersionsTable{
engineVersionsTable: newEngineVersionsTableImpl(schemaName, tableName, alias),
EXCLUDED: newEngineVersionsTableImpl("", "excluded", ""),
}
}
func newEngineVersionsTableImpl(schemaName, tableName, alias string) engineVersionsTable {
var (
VersionColumn = postgres.StringColumn("version")
ImageRefColumn = postgres.StringColumn("image_ref")
EnabledColumn = postgres.BoolColumn("enabled")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
allColumns = postgres.ColumnList{VersionColumn, ImageRefColumn, EnabledColumn, CreatedAtColumn, UpdatedAtColumn}
mutableColumns = postgres.ColumnList{ImageRefColumn, EnabledColumn, CreatedAtColumn, UpdatedAtColumn}
defaultColumns = postgres.ColumnList{EnabledColumn, CreatedAtColumn, UpdatedAtColumn}
)
return engineVersionsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
Version: VersionColumn,
ImageRef: ImageRefColumn,
Enabled: EnabledColumn,
CreatedAt: CreatedAtColumn,
UpdatedAt: UpdatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,108 @@
//
// 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 EntitlementRecords = newEntitlementRecordsTable("backend", "entitlement_records", "")
type entitlementRecordsTable struct {
postgres.Table
// Columns
RecordID postgres.ColumnString
UserID postgres.ColumnString
Tier postgres.ColumnString
IsPaid postgres.ColumnBool
Source postgres.ColumnString
ActorType postgres.ColumnString
ActorID postgres.ColumnString
ReasonCode postgres.ColumnString
StartsAt postgres.ColumnTimestampz
EndsAt postgres.ColumnTimestampz
CreatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type EntitlementRecordsTable struct {
entitlementRecordsTable
EXCLUDED entitlementRecordsTable
}
// AS creates new EntitlementRecordsTable with assigned alias
func (a EntitlementRecordsTable) AS(alias string) *EntitlementRecordsTable {
return newEntitlementRecordsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new EntitlementRecordsTable with assigned schema name
func (a EntitlementRecordsTable) FromSchema(schemaName string) *EntitlementRecordsTable {
return newEntitlementRecordsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new EntitlementRecordsTable with assigned table prefix
func (a EntitlementRecordsTable) WithPrefix(prefix string) *EntitlementRecordsTable {
return newEntitlementRecordsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new EntitlementRecordsTable with assigned table suffix
func (a EntitlementRecordsTable) WithSuffix(suffix string) *EntitlementRecordsTable {
return newEntitlementRecordsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newEntitlementRecordsTable(schemaName, tableName, alias string) *EntitlementRecordsTable {
return &EntitlementRecordsTable{
entitlementRecordsTable: newEntitlementRecordsTableImpl(schemaName, tableName, alias),
EXCLUDED: newEntitlementRecordsTableImpl("", "excluded", ""),
}
}
func newEntitlementRecordsTableImpl(schemaName, tableName, alias string) entitlementRecordsTable {
var (
RecordIDColumn = postgres.StringColumn("record_id")
UserIDColumn = postgres.StringColumn("user_id")
TierColumn = postgres.StringColumn("tier")
IsPaidColumn = postgres.BoolColumn("is_paid")
SourceColumn = postgres.StringColumn("source")
ActorTypeColumn = postgres.StringColumn("actor_type")
ActorIDColumn = postgres.StringColumn("actor_id")
ReasonCodeColumn = postgres.StringColumn("reason_code")
StartsAtColumn = postgres.TimestampzColumn("starts_at")
EndsAtColumn = postgres.TimestampzColumn("ends_at")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
allColumns = postgres.ColumnList{RecordIDColumn, UserIDColumn, TierColumn, IsPaidColumn, SourceColumn, ActorTypeColumn, ActorIDColumn, ReasonCodeColumn, StartsAtColumn, EndsAtColumn, CreatedAtColumn}
mutableColumns = postgres.ColumnList{UserIDColumn, TierColumn, IsPaidColumn, SourceColumn, ActorTypeColumn, ActorIDColumn, ReasonCodeColumn, StartsAtColumn, EndsAtColumn, CreatedAtColumn}
defaultColumns = postgres.ColumnList{ReasonCodeColumn, StartsAtColumn, CreatedAtColumn}
)
return entitlementRecordsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
RecordID: RecordIDColumn,
UserID: UserIDColumn,
Tier: TierColumn,
IsPaid: IsPaidColumn,
Source: SourceColumn,
ActorType: ActorTypeColumn,
ActorID: ActorIDColumn,
ReasonCode: ReasonCodeColumn,
StartsAt: StartsAtColumn,
EndsAt: EndsAtColumn,
CreatedAt: CreatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,108 @@
//
// 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 EntitlementSnapshots = newEntitlementSnapshotsTable("backend", "entitlement_snapshots", "")
type entitlementSnapshotsTable struct {
postgres.Table
// Columns
UserID postgres.ColumnString
Tier postgres.ColumnString
IsPaid postgres.ColumnBool
Source postgres.ColumnString
ActorType postgres.ColumnString
ActorID postgres.ColumnString
ReasonCode postgres.ColumnString
StartsAt postgres.ColumnTimestampz
EndsAt postgres.ColumnTimestampz
MaxRegisteredRaceNames postgres.ColumnInteger
UpdatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type EntitlementSnapshotsTable struct {
entitlementSnapshotsTable
EXCLUDED entitlementSnapshotsTable
}
// AS creates new EntitlementSnapshotsTable with assigned alias
func (a EntitlementSnapshotsTable) AS(alias string) *EntitlementSnapshotsTable {
return newEntitlementSnapshotsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new EntitlementSnapshotsTable with assigned schema name
func (a EntitlementSnapshotsTable) FromSchema(schemaName string) *EntitlementSnapshotsTable {
return newEntitlementSnapshotsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new EntitlementSnapshotsTable with assigned table prefix
func (a EntitlementSnapshotsTable) WithPrefix(prefix string) *EntitlementSnapshotsTable {
return newEntitlementSnapshotsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new EntitlementSnapshotsTable with assigned table suffix
func (a EntitlementSnapshotsTable) WithSuffix(suffix string) *EntitlementSnapshotsTable {
return newEntitlementSnapshotsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newEntitlementSnapshotsTable(schemaName, tableName, alias string) *EntitlementSnapshotsTable {
return &EntitlementSnapshotsTable{
entitlementSnapshotsTable: newEntitlementSnapshotsTableImpl(schemaName, tableName, alias),
EXCLUDED: newEntitlementSnapshotsTableImpl("", "excluded", ""),
}
}
func newEntitlementSnapshotsTableImpl(schemaName, tableName, alias string) entitlementSnapshotsTable {
var (
UserIDColumn = postgres.StringColumn("user_id")
TierColumn = postgres.StringColumn("tier")
IsPaidColumn = postgres.BoolColumn("is_paid")
SourceColumn = postgres.StringColumn("source")
ActorTypeColumn = postgres.StringColumn("actor_type")
ActorIDColumn = postgres.StringColumn("actor_id")
ReasonCodeColumn = postgres.StringColumn("reason_code")
StartsAtColumn = postgres.TimestampzColumn("starts_at")
EndsAtColumn = postgres.TimestampzColumn("ends_at")
MaxRegisteredRaceNamesColumn = postgres.IntegerColumn("max_registered_race_names")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
allColumns = postgres.ColumnList{UserIDColumn, TierColumn, IsPaidColumn, SourceColumn, ActorTypeColumn, ActorIDColumn, ReasonCodeColumn, StartsAtColumn, EndsAtColumn, MaxRegisteredRaceNamesColumn, UpdatedAtColumn}
mutableColumns = postgres.ColumnList{TierColumn, IsPaidColumn, SourceColumn, ActorTypeColumn, ActorIDColumn, ReasonCodeColumn, StartsAtColumn, EndsAtColumn, MaxRegisteredRaceNamesColumn, UpdatedAtColumn}
defaultColumns = postgres.ColumnList{ReasonCodeColumn, UpdatedAtColumn}
)
return entitlementSnapshotsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
UserID: UserIDColumn,
Tier: TierColumn,
IsPaid: IsPaidColumn,
Source: SourceColumn,
ActorType: ActorTypeColumn,
ActorID: ActorIDColumn,
ReasonCode: ReasonCodeColumn,
StartsAt: StartsAtColumn,
EndsAt: EndsAtColumn,
MaxRegisteredRaceNames: MaxRegisteredRaceNamesColumn,
UpdatedAt: UpdatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,132 @@
//
// 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 Games = newGamesTable("backend", "games", "")
type gamesTable struct {
postgres.Table
// Columns
GameID postgres.ColumnString
OwnerUserID postgres.ColumnString
Visibility postgres.ColumnString
Status postgres.ColumnString
GameName postgres.ColumnString
Description postgres.ColumnString
MinPlayers postgres.ColumnInteger
MaxPlayers postgres.ColumnInteger
StartGapHours postgres.ColumnInteger
StartGapPlayers postgres.ColumnInteger
EnrollmentEndsAt postgres.ColumnTimestampz
TurnSchedule postgres.ColumnString
TargetEngineVersion postgres.ColumnString
RuntimeSnapshot postgres.ColumnString
RuntimeBinding postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
UpdatedAt postgres.ColumnTimestampz
StartedAt postgres.ColumnTimestampz
FinishedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type GamesTable struct {
gamesTable
EXCLUDED gamesTable
}
// AS creates new GamesTable with assigned alias
func (a GamesTable) AS(alias string) *GamesTable {
return newGamesTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new GamesTable with assigned schema name
func (a GamesTable) FromSchema(schemaName string) *GamesTable {
return newGamesTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new GamesTable with assigned table prefix
func (a GamesTable) WithPrefix(prefix string) *GamesTable {
return newGamesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new GamesTable with assigned table suffix
func (a GamesTable) WithSuffix(suffix string) *GamesTable {
return newGamesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newGamesTable(schemaName, tableName, alias string) *GamesTable {
return &GamesTable{
gamesTable: newGamesTableImpl(schemaName, tableName, alias),
EXCLUDED: newGamesTableImpl("", "excluded", ""),
}
}
func newGamesTableImpl(schemaName, tableName, alias string) gamesTable {
var (
GameIDColumn = postgres.StringColumn("game_id")
OwnerUserIDColumn = postgres.StringColumn("owner_user_id")
VisibilityColumn = postgres.StringColumn("visibility")
StatusColumn = postgres.StringColumn("status")
GameNameColumn = postgres.StringColumn("game_name")
DescriptionColumn = postgres.StringColumn("description")
MinPlayersColumn = postgres.IntegerColumn("min_players")
MaxPlayersColumn = postgres.IntegerColumn("max_players")
StartGapHoursColumn = postgres.IntegerColumn("start_gap_hours")
StartGapPlayersColumn = postgres.IntegerColumn("start_gap_players")
EnrollmentEndsAtColumn = postgres.TimestampzColumn("enrollment_ends_at")
TurnScheduleColumn = postgres.StringColumn("turn_schedule")
TargetEngineVersionColumn = postgres.StringColumn("target_engine_version")
RuntimeSnapshotColumn = postgres.StringColumn("runtime_snapshot")
RuntimeBindingColumn = postgres.StringColumn("runtime_binding")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
StartedAtColumn = postgres.TimestampzColumn("started_at")
FinishedAtColumn = postgres.TimestampzColumn("finished_at")
allColumns = postgres.ColumnList{GameIDColumn, OwnerUserIDColumn, VisibilityColumn, StatusColumn, GameNameColumn, DescriptionColumn, MinPlayersColumn, MaxPlayersColumn, StartGapHoursColumn, StartGapPlayersColumn, EnrollmentEndsAtColumn, TurnScheduleColumn, TargetEngineVersionColumn, RuntimeSnapshotColumn, RuntimeBindingColumn, CreatedAtColumn, UpdatedAtColumn, StartedAtColumn, FinishedAtColumn}
mutableColumns = postgres.ColumnList{OwnerUserIDColumn, VisibilityColumn, StatusColumn, GameNameColumn, DescriptionColumn, MinPlayersColumn, MaxPlayersColumn, StartGapHoursColumn, StartGapPlayersColumn, EnrollmentEndsAtColumn, TurnScheduleColumn, TargetEngineVersionColumn, RuntimeSnapshotColumn, RuntimeBindingColumn, CreatedAtColumn, UpdatedAtColumn, StartedAtColumn, FinishedAtColumn}
defaultColumns = postgres.ColumnList{DescriptionColumn, RuntimeSnapshotColumn, CreatedAtColumn, UpdatedAtColumn}
)
return gamesTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
GameID: GameIDColumn,
OwnerUserID: OwnerUserIDColumn,
Visibility: VisibilityColumn,
Status: StatusColumn,
GameName: GameNameColumn,
Description: DescriptionColumn,
MinPlayers: MinPlayersColumn,
MaxPlayers: MaxPlayersColumn,
StartGapHours: StartGapHoursColumn,
StartGapPlayers: StartGapPlayersColumn,
EnrollmentEndsAt: EnrollmentEndsAtColumn,
TurnSchedule: TurnScheduleColumn,
TargetEngineVersion: TargetEngineVersionColumn,
RuntimeSnapshot: RuntimeSnapshotColumn,
RuntimeBinding: RuntimeBindingColumn,
CreatedAt: CreatedAtColumn,
UpdatedAt: UpdatedAtColumn,
StartedAt: StartedAtColumn,
FinishedAt: FinishedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,105 @@
//
// 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 Invites = newInvitesTable("backend", "invites", "")
type invitesTable struct {
postgres.Table
// Columns
InviteID postgres.ColumnString
GameID postgres.ColumnString
InviterUserID postgres.ColumnString
InvitedUserID postgres.ColumnString
Code postgres.ColumnString
Status postgres.ColumnString
RaceName postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
ExpiresAt postgres.ColumnTimestampz
DecidedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type InvitesTable struct {
invitesTable
EXCLUDED invitesTable
}
// AS creates new InvitesTable with assigned alias
func (a InvitesTable) AS(alias string) *InvitesTable {
return newInvitesTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new InvitesTable with assigned schema name
func (a InvitesTable) FromSchema(schemaName string) *InvitesTable {
return newInvitesTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new InvitesTable with assigned table prefix
func (a InvitesTable) WithPrefix(prefix string) *InvitesTable {
return newInvitesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new InvitesTable with assigned table suffix
func (a InvitesTable) WithSuffix(suffix string) *InvitesTable {
return newInvitesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newInvitesTable(schemaName, tableName, alias string) *InvitesTable {
return &InvitesTable{
invitesTable: newInvitesTableImpl(schemaName, tableName, alias),
EXCLUDED: newInvitesTableImpl("", "excluded", ""),
}
}
func newInvitesTableImpl(schemaName, tableName, alias string) invitesTable {
var (
InviteIDColumn = postgres.StringColumn("invite_id")
GameIDColumn = postgres.StringColumn("game_id")
InviterUserIDColumn = postgres.StringColumn("inviter_user_id")
InvitedUserIDColumn = postgres.StringColumn("invited_user_id")
CodeColumn = postgres.StringColumn("code")
StatusColumn = postgres.StringColumn("status")
RaceNameColumn = postgres.StringColumn("race_name")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
DecidedAtColumn = postgres.TimestampzColumn("decided_at")
allColumns = postgres.ColumnList{InviteIDColumn, GameIDColumn, InviterUserIDColumn, InvitedUserIDColumn, CodeColumn, StatusColumn, RaceNameColumn, CreatedAtColumn, ExpiresAtColumn, DecidedAtColumn}
mutableColumns = postgres.ColumnList{GameIDColumn, InviterUserIDColumn, InvitedUserIDColumn, CodeColumn, StatusColumn, RaceNameColumn, CreatedAtColumn, ExpiresAtColumn, DecidedAtColumn}
defaultColumns = postgres.ColumnList{RaceNameColumn, CreatedAtColumn}
)
return invitesTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
InviteID: InviteIDColumn,
GameID: GameIDColumn,
InviterUserID: InviterUserIDColumn,
InvitedUserID: InvitedUserIDColumn,
Code: CodeColumn,
Status: StatusColumn,
RaceName: RaceNameColumn,
CreatedAt: CreatedAtColumn,
ExpiresAt: ExpiresAtColumn,
DecidedAt: DecidedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,87 @@
//
// 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 LimitActive = newLimitActiveTable("backend", "limit_active", "")
type limitActiveTable struct {
postgres.Table
// Columns
UserID postgres.ColumnString
LimitCode postgres.ColumnString
RecordID postgres.ColumnString
Value postgres.ColumnInteger
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type LimitActiveTable struct {
limitActiveTable
EXCLUDED limitActiveTable
}
// AS creates new LimitActiveTable with assigned alias
func (a LimitActiveTable) AS(alias string) *LimitActiveTable {
return newLimitActiveTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new LimitActiveTable with assigned schema name
func (a LimitActiveTable) FromSchema(schemaName string) *LimitActiveTable {
return newLimitActiveTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new LimitActiveTable with assigned table prefix
func (a LimitActiveTable) WithPrefix(prefix string) *LimitActiveTable {
return newLimitActiveTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new LimitActiveTable with assigned table suffix
func (a LimitActiveTable) WithSuffix(suffix string) *LimitActiveTable {
return newLimitActiveTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newLimitActiveTable(schemaName, tableName, alias string) *LimitActiveTable {
return &LimitActiveTable{
limitActiveTable: newLimitActiveTableImpl(schemaName, tableName, alias),
EXCLUDED: newLimitActiveTableImpl("", "excluded", ""),
}
}
func newLimitActiveTableImpl(schemaName, tableName, alias string) limitActiveTable {
var (
UserIDColumn = postgres.StringColumn("user_id")
LimitCodeColumn = postgres.StringColumn("limit_code")
RecordIDColumn = postgres.StringColumn("record_id")
ValueColumn = postgres.IntegerColumn("value")
allColumns = postgres.ColumnList{UserIDColumn, LimitCodeColumn, RecordIDColumn, ValueColumn}
mutableColumns = postgres.ColumnList{RecordIDColumn, ValueColumn}
defaultColumns = postgres.ColumnList{}
)
return limitActiveTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
UserID: UserIDColumn,
LimitCode: LimitCodeColumn,
RecordID: RecordIDColumn,
Value: ValueColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,114 @@
//
// 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 LimitRecords = newLimitRecordsTable("backend", "limit_records", "")
type limitRecordsTable struct {
postgres.Table
// Columns
RecordID postgres.ColumnString
UserID postgres.ColumnString
LimitCode postgres.ColumnString
Value postgres.ColumnInteger
ReasonCode postgres.ColumnString
ActorType postgres.ColumnString
ActorID postgres.ColumnString
AppliedAt postgres.ColumnTimestampz
ExpiresAt postgres.ColumnTimestampz
RemovedAt postgres.ColumnTimestampz
RemovedByType postgres.ColumnString
RemovedByID postgres.ColumnString
RemovedReasonCode postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type LimitRecordsTable struct {
limitRecordsTable
EXCLUDED limitRecordsTable
}
// AS creates new LimitRecordsTable with assigned alias
func (a LimitRecordsTable) AS(alias string) *LimitRecordsTable {
return newLimitRecordsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new LimitRecordsTable with assigned schema name
func (a LimitRecordsTable) FromSchema(schemaName string) *LimitRecordsTable {
return newLimitRecordsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new LimitRecordsTable with assigned table prefix
func (a LimitRecordsTable) WithPrefix(prefix string) *LimitRecordsTable {
return newLimitRecordsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new LimitRecordsTable with assigned table suffix
func (a LimitRecordsTable) WithSuffix(suffix string) *LimitRecordsTable {
return newLimitRecordsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newLimitRecordsTable(schemaName, tableName, alias string) *LimitRecordsTable {
return &LimitRecordsTable{
limitRecordsTable: newLimitRecordsTableImpl(schemaName, tableName, alias),
EXCLUDED: newLimitRecordsTableImpl("", "excluded", ""),
}
}
func newLimitRecordsTableImpl(schemaName, tableName, alias string) limitRecordsTable {
var (
RecordIDColumn = postgres.StringColumn("record_id")
UserIDColumn = postgres.StringColumn("user_id")
LimitCodeColumn = postgres.StringColumn("limit_code")
ValueColumn = postgres.IntegerColumn("value")
ReasonCodeColumn = postgres.StringColumn("reason_code")
ActorTypeColumn = postgres.StringColumn("actor_type")
ActorIDColumn = postgres.StringColumn("actor_id")
AppliedAtColumn = postgres.TimestampzColumn("applied_at")
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
RemovedAtColumn = postgres.TimestampzColumn("removed_at")
RemovedByTypeColumn = postgres.StringColumn("removed_by_type")
RemovedByIDColumn = postgres.StringColumn("removed_by_id")
RemovedReasonCodeColumn = postgres.StringColumn("removed_reason_code")
allColumns = postgres.ColumnList{RecordIDColumn, UserIDColumn, LimitCodeColumn, ValueColumn, ReasonCodeColumn, ActorTypeColumn, ActorIDColumn, AppliedAtColumn, ExpiresAtColumn, RemovedAtColumn, RemovedByTypeColumn, RemovedByIDColumn, RemovedReasonCodeColumn}
mutableColumns = postgres.ColumnList{UserIDColumn, LimitCodeColumn, ValueColumn, ReasonCodeColumn, ActorTypeColumn, ActorIDColumn, AppliedAtColumn, ExpiresAtColumn, RemovedAtColumn, RemovedByTypeColumn, RemovedByIDColumn, RemovedReasonCodeColumn}
defaultColumns = postgres.ColumnList{AppliedAtColumn}
)
return limitRecordsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
RecordID: RecordIDColumn,
UserID: UserIDColumn,
LimitCode: LimitCodeColumn,
Value: ValueColumn,
ReasonCode: ReasonCodeColumn,
ActorType: ActorTypeColumn,
ActorID: ActorIDColumn,
AppliedAt: AppliedAtColumn,
ExpiresAt: ExpiresAtColumn,
RemovedAt: RemovedAtColumn,
RemovedByType: RemovedByTypeColumn,
RemovedByID: RemovedByIDColumn,
RemovedReasonCode: RemovedReasonCodeColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,96 @@
//
// 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 MailAttempts = newMailAttemptsTable("backend", "mail_attempts", "")
type mailAttemptsTable struct {
postgres.Table
// Columns
AttemptID postgres.ColumnString
DeliveryID postgres.ColumnString
AttemptNo postgres.ColumnInteger
StartedAt postgres.ColumnTimestampz
FinishedAt postgres.ColumnTimestampz
Outcome postgres.ColumnString
Error postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type MailAttemptsTable struct {
mailAttemptsTable
EXCLUDED mailAttemptsTable
}
// AS creates new MailAttemptsTable with assigned alias
func (a MailAttemptsTable) AS(alias string) *MailAttemptsTable {
return newMailAttemptsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new MailAttemptsTable with assigned schema name
func (a MailAttemptsTable) FromSchema(schemaName string) *MailAttemptsTable {
return newMailAttemptsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new MailAttemptsTable with assigned table prefix
func (a MailAttemptsTable) WithPrefix(prefix string) *MailAttemptsTable {
return newMailAttemptsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new MailAttemptsTable with assigned table suffix
func (a MailAttemptsTable) WithSuffix(suffix string) *MailAttemptsTable {
return newMailAttemptsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newMailAttemptsTable(schemaName, tableName, alias string) *MailAttemptsTable {
return &MailAttemptsTable{
mailAttemptsTable: newMailAttemptsTableImpl(schemaName, tableName, alias),
EXCLUDED: newMailAttemptsTableImpl("", "excluded", ""),
}
}
func newMailAttemptsTableImpl(schemaName, tableName, alias string) mailAttemptsTable {
var (
AttemptIDColumn = postgres.StringColumn("attempt_id")
DeliveryIDColumn = postgres.StringColumn("delivery_id")
AttemptNoColumn = postgres.IntegerColumn("attempt_no")
StartedAtColumn = postgres.TimestampzColumn("started_at")
FinishedAtColumn = postgres.TimestampzColumn("finished_at")
OutcomeColumn = postgres.StringColumn("outcome")
ErrorColumn = postgres.StringColumn("error")
allColumns = postgres.ColumnList{AttemptIDColumn, DeliveryIDColumn, AttemptNoColumn, StartedAtColumn, FinishedAtColumn, OutcomeColumn, ErrorColumn}
mutableColumns = postgres.ColumnList{DeliveryIDColumn, AttemptNoColumn, StartedAtColumn, FinishedAtColumn, OutcomeColumn, ErrorColumn}
defaultColumns = postgres.ColumnList{StartedAtColumn, ErrorColumn}
)
return mailAttemptsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
AttemptID: AttemptIDColumn,
DeliveryID: DeliveryIDColumn,
AttemptNo: AttemptNoColumn,
StartedAt: StartedAtColumn,
FinishedAt: FinishedAtColumn,
Outcome: OutcomeColumn,
Error: ErrorColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,87 @@
//
// 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 MailDeadLetters = newMailDeadLettersTable("backend", "mail_dead_letters", "")
type mailDeadLettersTable struct {
postgres.Table
// Columns
DeadLetterID postgres.ColumnString
DeliveryID postgres.ColumnString
ArchivedAt postgres.ColumnTimestampz
Reason postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type MailDeadLettersTable struct {
mailDeadLettersTable
EXCLUDED mailDeadLettersTable
}
// AS creates new MailDeadLettersTable with assigned alias
func (a MailDeadLettersTable) AS(alias string) *MailDeadLettersTable {
return newMailDeadLettersTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new MailDeadLettersTable with assigned schema name
func (a MailDeadLettersTable) FromSchema(schemaName string) *MailDeadLettersTable {
return newMailDeadLettersTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new MailDeadLettersTable with assigned table prefix
func (a MailDeadLettersTable) WithPrefix(prefix string) *MailDeadLettersTable {
return newMailDeadLettersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new MailDeadLettersTable with assigned table suffix
func (a MailDeadLettersTable) WithSuffix(suffix string) *MailDeadLettersTable {
return newMailDeadLettersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newMailDeadLettersTable(schemaName, tableName, alias string) *MailDeadLettersTable {
return &MailDeadLettersTable{
mailDeadLettersTable: newMailDeadLettersTableImpl(schemaName, tableName, alias),
EXCLUDED: newMailDeadLettersTableImpl("", "excluded", ""),
}
}
func newMailDeadLettersTableImpl(schemaName, tableName, alias string) mailDeadLettersTable {
var (
DeadLetterIDColumn = postgres.StringColumn("dead_letter_id")
DeliveryIDColumn = postgres.StringColumn("delivery_id")
ArchivedAtColumn = postgres.TimestampzColumn("archived_at")
ReasonColumn = postgres.StringColumn("reason")
allColumns = postgres.ColumnList{DeadLetterIDColumn, DeliveryIDColumn, ArchivedAtColumn, ReasonColumn}
mutableColumns = postgres.ColumnList{DeliveryIDColumn, ArchivedAtColumn, ReasonColumn}
defaultColumns = postgres.ColumnList{ArchivedAtColumn}
)
return mailDeadLettersTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
DeadLetterID: DeadLetterIDColumn,
DeliveryID: DeliveryIDColumn,
ArchivedAt: ArchivedAtColumn,
Reason: ReasonColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,111 @@
//
// 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 MailDeliveries = newMailDeliveriesTable("backend", "mail_deliveries", "")
type mailDeliveriesTable struct {
postgres.Table
// Columns
DeliveryID postgres.ColumnString
TemplateID postgres.ColumnString
IdempotencyKey postgres.ColumnString
Status postgres.ColumnString
Attempts postgres.ColumnInteger
NextAttemptAt postgres.ColumnTimestampz
PayloadID postgres.ColumnString
LastError postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
UpdatedAt postgres.ColumnTimestampz
SentAt postgres.ColumnTimestampz
DeadLetteredAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type MailDeliveriesTable struct {
mailDeliveriesTable
EXCLUDED mailDeliveriesTable
}
// AS creates new MailDeliveriesTable with assigned alias
func (a MailDeliveriesTable) AS(alias string) *MailDeliveriesTable {
return newMailDeliveriesTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new MailDeliveriesTable with assigned schema name
func (a MailDeliveriesTable) FromSchema(schemaName string) *MailDeliveriesTable {
return newMailDeliveriesTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new MailDeliveriesTable with assigned table prefix
func (a MailDeliveriesTable) WithPrefix(prefix string) *MailDeliveriesTable {
return newMailDeliveriesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new MailDeliveriesTable with assigned table suffix
func (a MailDeliveriesTable) WithSuffix(suffix string) *MailDeliveriesTable {
return newMailDeliveriesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newMailDeliveriesTable(schemaName, tableName, alias string) *MailDeliveriesTable {
return &MailDeliveriesTable{
mailDeliveriesTable: newMailDeliveriesTableImpl(schemaName, tableName, alias),
EXCLUDED: newMailDeliveriesTableImpl("", "excluded", ""),
}
}
func newMailDeliveriesTableImpl(schemaName, tableName, alias string) mailDeliveriesTable {
var (
DeliveryIDColumn = postgres.StringColumn("delivery_id")
TemplateIDColumn = postgres.StringColumn("template_id")
IdempotencyKeyColumn = postgres.StringColumn("idempotency_key")
StatusColumn = postgres.StringColumn("status")
AttemptsColumn = postgres.IntegerColumn("attempts")
NextAttemptAtColumn = postgres.TimestampzColumn("next_attempt_at")
PayloadIDColumn = postgres.StringColumn("payload_id")
LastErrorColumn = postgres.StringColumn("last_error")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
SentAtColumn = postgres.TimestampzColumn("sent_at")
DeadLetteredAtColumn = postgres.TimestampzColumn("dead_lettered_at")
allColumns = postgres.ColumnList{DeliveryIDColumn, TemplateIDColumn, IdempotencyKeyColumn, StatusColumn, AttemptsColumn, NextAttemptAtColumn, PayloadIDColumn, LastErrorColumn, CreatedAtColumn, UpdatedAtColumn, SentAtColumn, DeadLetteredAtColumn}
mutableColumns = postgres.ColumnList{TemplateIDColumn, IdempotencyKeyColumn, StatusColumn, AttemptsColumn, NextAttemptAtColumn, PayloadIDColumn, LastErrorColumn, CreatedAtColumn, UpdatedAtColumn, SentAtColumn, DeadLetteredAtColumn}
defaultColumns = postgres.ColumnList{AttemptsColumn, LastErrorColumn, CreatedAtColumn, UpdatedAtColumn}
)
return mailDeliveriesTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
DeliveryID: DeliveryIDColumn,
TemplateID: TemplateIDColumn,
IdempotencyKey: IdempotencyKeyColumn,
Status: StatusColumn,
Attempts: AttemptsColumn,
NextAttemptAt: NextAttemptAtColumn,
PayloadID: PayloadIDColumn,
LastError: LastErrorColumn,
CreatedAt: CreatedAtColumn,
UpdatedAt: UpdatedAtColumn,
SentAt: SentAtColumn,
DeadLetteredAt: DeadLetteredAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,90 @@
//
// 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 MailPayloads = newMailPayloadsTable("backend", "mail_payloads", "")
type mailPayloadsTable struct {
postgres.Table
// Columns
PayloadID postgres.ColumnString
ContentType postgres.ColumnString
Subject postgres.ColumnString
Body postgres.ColumnBytea
CreatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type MailPayloadsTable struct {
mailPayloadsTable
EXCLUDED mailPayloadsTable
}
// AS creates new MailPayloadsTable with assigned alias
func (a MailPayloadsTable) AS(alias string) *MailPayloadsTable {
return newMailPayloadsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new MailPayloadsTable with assigned schema name
func (a MailPayloadsTable) FromSchema(schemaName string) *MailPayloadsTable {
return newMailPayloadsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new MailPayloadsTable with assigned table prefix
func (a MailPayloadsTable) WithPrefix(prefix string) *MailPayloadsTable {
return newMailPayloadsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new MailPayloadsTable with assigned table suffix
func (a MailPayloadsTable) WithSuffix(suffix string) *MailPayloadsTable {
return newMailPayloadsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newMailPayloadsTable(schemaName, tableName, alias string) *MailPayloadsTable {
return &MailPayloadsTable{
mailPayloadsTable: newMailPayloadsTableImpl(schemaName, tableName, alias),
EXCLUDED: newMailPayloadsTableImpl("", "excluded", ""),
}
}
func newMailPayloadsTableImpl(schemaName, tableName, alias string) mailPayloadsTable {
var (
PayloadIDColumn = postgres.StringColumn("payload_id")
ContentTypeColumn = postgres.StringColumn("content_type")
SubjectColumn = postgres.StringColumn("subject")
BodyColumn = postgres.ByteaColumn("body")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
allColumns = postgres.ColumnList{PayloadIDColumn, ContentTypeColumn, SubjectColumn, BodyColumn, CreatedAtColumn}
mutableColumns = postgres.ColumnList{ContentTypeColumn, SubjectColumn, BodyColumn, CreatedAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return mailPayloadsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
PayloadID: PayloadIDColumn,
ContentType: ContentTypeColumn,
Subject: SubjectColumn,
Body: BodyColumn,
CreatedAt: CreatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,87 @@
//
// 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 MailRecipients = newMailRecipientsTable("backend", "mail_recipients", "")
type mailRecipientsTable struct {
postgres.Table
// Columns
RecipientID postgres.ColumnString
DeliveryID postgres.ColumnString
Address postgres.ColumnString
Kind postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type MailRecipientsTable struct {
mailRecipientsTable
EXCLUDED mailRecipientsTable
}
// AS creates new MailRecipientsTable with assigned alias
func (a MailRecipientsTable) AS(alias string) *MailRecipientsTable {
return newMailRecipientsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new MailRecipientsTable with assigned schema name
func (a MailRecipientsTable) FromSchema(schemaName string) *MailRecipientsTable {
return newMailRecipientsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new MailRecipientsTable with assigned table prefix
func (a MailRecipientsTable) WithPrefix(prefix string) *MailRecipientsTable {
return newMailRecipientsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new MailRecipientsTable with assigned table suffix
func (a MailRecipientsTable) WithSuffix(suffix string) *MailRecipientsTable {
return newMailRecipientsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newMailRecipientsTable(schemaName, tableName, alias string) *MailRecipientsTable {
return &MailRecipientsTable{
mailRecipientsTable: newMailRecipientsTableImpl(schemaName, tableName, alias),
EXCLUDED: newMailRecipientsTableImpl("", "excluded", ""),
}
}
func newMailRecipientsTableImpl(schemaName, tableName, alias string) mailRecipientsTable {
var (
RecipientIDColumn = postgres.StringColumn("recipient_id")
DeliveryIDColumn = postgres.StringColumn("delivery_id")
AddressColumn = postgres.StringColumn("address")
KindColumn = postgres.StringColumn("kind")
allColumns = postgres.ColumnList{RecipientIDColumn, DeliveryIDColumn, AddressColumn, KindColumn}
mutableColumns = postgres.ColumnList{DeliveryIDColumn, AddressColumn, KindColumn}
defaultColumns = postgres.ColumnList{}
)
return mailRecipientsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
RecipientID: RecipientIDColumn,
DeliveryID: DeliveryIDColumn,
Address: AddressColumn,
Kind: KindColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,99 @@
//
// 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 Memberships = newMembershipsTable("backend", "memberships", "")
type membershipsTable struct {
postgres.Table
// Columns
MembershipID postgres.ColumnString
GameID postgres.ColumnString
UserID postgres.ColumnString
RaceName postgres.ColumnString
CanonicalKey postgres.ColumnString
Status postgres.ColumnString
JoinedAt postgres.ColumnTimestampz
RemovedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type MembershipsTable struct {
membershipsTable
EXCLUDED membershipsTable
}
// AS creates new MembershipsTable with assigned alias
func (a MembershipsTable) AS(alias string) *MembershipsTable {
return newMembershipsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new MembershipsTable with assigned schema name
func (a MembershipsTable) FromSchema(schemaName string) *MembershipsTable {
return newMembershipsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new MembershipsTable with assigned table prefix
func (a MembershipsTable) WithPrefix(prefix string) *MembershipsTable {
return newMembershipsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new MembershipsTable with assigned table suffix
func (a MembershipsTable) WithSuffix(suffix string) *MembershipsTable {
return newMembershipsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newMembershipsTable(schemaName, tableName, alias string) *MembershipsTable {
return &MembershipsTable{
membershipsTable: newMembershipsTableImpl(schemaName, tableName, alias),
EXCLUDED: newMembershipsTableImpl("", "excluded", ""),
}
}
func newMembershipsTableImpl(schemaName, tableName, alias string) membershipsTable {
var (
MembershipIDColumn = postgres.StringColumn("membership_id")
GameIDColumn = postgres.StringColumn("game_id")
UserIDColumn = postgres.StringColumn("user_id")
RaceNameColumn = postgres.StringColumn("race_name")
CanonicalKeyColumn = postgres.StringColumn("canonical_key")
StatusColumn = postgres.StringColumn("status")
JoinedAtColumn = postgres.TimestampzColumn("joined_at")
RemovedAtColumn = postgres.TimestampzColumn("removed_at")
allColumns = postgres.ColumnList{MembershipIDColumn, GameIDColumn, UserIDColumn, RaceNameColumn, CanonicalKeyColumn, StatusColumn, JoinedAtColumn, RemovedAtColumn}
mutableColumns = postgres.ColumnList{GameIDColumn, UserIDColumn, RaceNameColumn, CanonicalKeyColumn, StatusColumn, JoinedAtColumn, RemovedAtColumn}
defaultColumns = postgres.ColumnList{JoinedAtColumn}
)
return membershipsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
MembershipID: MembershipIDColumn,
GameID: GameIDColumn,
UserID: UserIDColumn,
RaceName: RaceNameColumn,
CanonicalKey: CanonicalKeyColumn,
Status: StatusColumn,
JoinedAt: JoinedAtColumn,
RemovedAt: RemovedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,90 @@
//
// 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 NotificationDeadLetters = newNotificationDeadLettersTable("backend", "notification_dead_letters", "")
type notificationDeadLettersTable struct {
postgres.Table
// Columns
DeadLetterID postgres.ColumnString
NotificationID postgres.ColumnString
RouteID postgres.ColumnString
ArchivedAt postgres.ColumnTimestampz
Reason postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type NotificationDeadLettersTable struct {
notificationDeadLettersTable
EXCLUDED notificationDeadLettersTable
}
// AS creates new NotificationDeadLettersTable with assigned alias
func (a NotificationDeadLettersTable) AS(alias string) *NotificationDeadLettersTable {
return newNotificationDeadLettersTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new NotificationDeadLettersTable with assigned schema name
func (a NotificationDeadLettersTable) FromSchema(schemaName string) *NotificationDeadLettersTable {
return newNotificationDeadLettersTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new NotificationDeadLettersTable with assigned table prefix
func (a NotificationDeadLettersTable) WithPrefix(prefix string) *NotificationDeadLettersTable {
return newNotificationDeadLettersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new NotificationDeadLettersTable with assigned table suffix
func (a NotificationDeadLettersTable) WithSuffix(suffix string) *NotificationDeadLettersTable {
return newNotificationDeadLettersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newNotificationDeadLettersTable(schemaName, tableName, alias string) *NotificationDeadLettersTable {
return &NotificationDeadLettersTable{
notificationDeadLettersTable: newNotificationDeadLettersTableImpl(schemaName, tableName, alias),
EXCLUDED: newNotificationDeadLettersTableImpl("", "excluded", ""),
}
}
func newNotificationDeadLettersTableImpl(schemaName, tableName, alias string) notificationDeadLettersTable {
var (
DeadLetterIDColumn = postgres.StringColumn("dead_letter_id")
NotificationIDColumn = postgres.StringColumn("notification_id")
RouteIDColumn = postgres.StringColumn("route_id")
ArchivedAtColumn = postgres.TimestampzColumn("archived_at")
ReasonColumn = postgres.StringColumn("reason")
allColumns = postgres.ColumnList{DeadLetterIDColumn, NotificationIDColumn, RouteIDColumn, ArchivedAtColumn, ReasonColumn}
mutableColumns = postgres.ColumnList{NotificationIDColumn, RouteIDColumn, ArchivedAtColumn, ReasonColumn}
defaultColumns = postgres.ColumnList{ArchivedAtColumn}
)
return notificationDeadLettersTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
DeadLetterID: DeadLetterIDColumn,
NotificationID: NotificationIDColumn,
RouteID: RouteIDColumn,
ArchivedAt: ArchivedAtColumn,
Reason: ReasonColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,87 @@
//
// 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 NotificationMalformedIntents = newNotificationMalformedIntentsTable("backend", "notification_malformed_intents", "")
type notificationMalformedIntentsTable struct {
postgres.Table
// Columns
ID postgres.ColumnString
ReceivedAt postgres.ColumnTimestampz
Payload postgres.ColumnString
Reason postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type NotificationMalformedIntentsTable struct {
notificationMalformedIntentsTable
EXCLUDED notificationMalformedIntentsTable
}
// AS creates new NotificationMalformedIntentsTable with assigned alias
func (a NotificationMalformedIntentsTable) AS(alias string) *NotificationMalformedIntentsTable {
return newNotificationMalformedIntentsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new NotificationMalformedIntentsTable with assigned schema name
func (a NotificationMalformedIntentsTable) FromSchema(schemaName string) *NotificationMalformedIntentsTable {
return newNotificationMalformedIntentsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new NotificationMalformedIntentsTable with assigned table prefix
func (a NotificationMalformedIntentsTable) WithPrefix(prefix string) *NotificationMalformedIntentsTable {
return newNotificationMalformedIntentsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new NotificationMalformedIntentsTable with assigned table suffix
func (a NotificationMalformedIntentsTable) WithSuffix(suffix string) *NotificationMalformedIntentsTable {
return newNotificationMalformedIntentsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newNotificationMalformedIntentsTable(schemaName, tableName, alias string) *NotificationMalformedIntentsTable {
return &NotificationMalformedIntentsTable{
notificationMalformedIntentsTable: newNotificationMalformedIntentsTableImpl(schemaName, tableName, alias),
EXCLUDED: newNotificationMalformedIntentsTableImpl("", "excluded", ""),
}
}
func newNotificationMalformedIntentsTableImpl(schemaName, tableName, alias string) notificationMalformedIntentsTable {
var (
IDColumn = postgres.StringColumn("id")
ReceivedAtColumn = postgres.TimestampzColumn("received_at")
PayloadColumn = postgres.StringColumn("payload")
ReasonColumn = postgres.StringColumn("reason")
allColumns = postgres.ColumnList{IDColumn, ReceivedAtColumn, PayloadColumn, ReasonColumn}
mutableColumns = postgres.ColumnList{ReceivedAtColumn, PayloadColumn, ReasonColumn}
defaultColumns = postgres.ColumnList{ReceivedAtColumn}
)
return notificationMalformedIntentsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
ID: IDColumn,
ReceivedAt: ReceivedAtColumn,
Payload: PayloadColumn,
Reason: ReasonColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,123 @@
//
// 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 NotificationRoutes = newNotificationRoutesTable("backend", "notification_routes", "")
type notificationRoutesTable struct {
postgres.Table
// Columns
RouteID postgres.ColumnString
NotificationID postgres.ColumnString
Channel postgres.ColumnString
Status postgres.ColumnString
Attempts postgres.ColumnInteger
MaxAttempts postgres.ColumnInteger
NextAttemptAt postgres.ColumnTimestampz
LastAttemptAt postgres.ColumnTimestampz
LastError postgres.ColumnString
ResolvedEmail postgres.ColumnString
ResolvedLocale postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
UpdatedAt postgres.ColumnTimestampz
PublishedAt postgres.ColumnTimestampz
DeadLetteredAt postgres.ColumnTimestampz
SkippedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type NotificationRoutesTable struct {
notificationRoutesTable
EXCLUDED notificationRoutesTable
}
// AS creates new NotificationRoutesTable with assigned alias
func (a NotificationRoutesTable) AS(alias string) *NotificationRoutesTable {
return newNotificationRoutesTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new NotificationRoutesTable with assigned schema name
func (a NotificationRoutesTable) FromSchema(schemaName string) *NotificationRoutesTable {
return newNotificationRoutesTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new NotificationRoutesTable with assigned table prefix
func (a NotificationRoutesTable) WithPrefix(prefix string) *NotificationRoutesTable {
return newNotificationRoutesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new NotificationRoutesTable with assigned table suffix
func (a NotificationRoutesTable) WithSuffix(suffix string) *NotificationRoutesTable {
return newNotificationRoutesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newNotificationRoutesTable(schemaName, tableName, alias string) *NotificationRoutesTable {
return &NotificationRoutesTable{
notificationRoutesTable: newNotificationRoutesTableImpl(schemaName, tableName, alias),
EXCLUDED: newNotificationRoutesTableImpl("", "excluded", ""),
}
}
func newNotificationRoutesTableImpl(schemaName, tableName, alias string) notificationRoutesTable {
var (
RouteIDColumn = postgres.StringColumn("route_id")
NotificationIDColumn = postgres.StringColumn("notification_id")
ChannelColumn = postgres.StringColumn("channel")
StatusColumn = postgres.StringColumn("status")
AttemptsColumn = postgres.IntegerColumn("attempts")
MaxAttemptsColumn = postgres.IntegerColumn("max_attempts")
NextAttemptAtColumn = postgres.TimestampzColumn("next_attempt_at")
LastAttemptAtColumn = postgres.TimestampzColumn("last_attempt_at")
LastErrorColumn = postgres.StringColumn("last_error")
ResolvedEmailColumn = postgres.StringColumn("resolved_email")
ResolvedLocaleColumn = postgres.StringColumn("resolved_locale")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
PublishedAtColumn = postgres.TimestampzColumn("published_at")
DeadLetteredAtColumn = postgres.TimestampzColumn("dead_lettered_at")
SkippedAtColumn = postgres.TimestampzColumn("skipped_at")
allColumns = postgres.ColumnList{RouteIDColumn, NotificationIDColumn, ChannelColumn, StatusColumn, AttemptsColumn, MaxAttemptsColumn, NextAttemptAtColumn, LastAttemptAtColumn, LastErrorColumn, ResolvedEmailColumn, ResolvedLocaleColumn, CreatedAtColumn, UpdatedAtColumn, PublishedAtColumn, DeadLetteredAtColumn, SkippedAtColumn}
mutableColumns = postgres.ColumnList{NotificationIDColumn, ChannelColumn, StatusColumn, AttemptsColumn, MaxAttemptsColumn, NextAttemptAtColumn, LastAttemptAtColumn, LastErrorColumn, ResolvedEmailColumn, ResolvedLocaleColumn, CreatedAtColumn, UpdatedAtColumn, PublishedAtColumn, DeadLetteredAtColumn, SkippedAtColumn}
defaultColumns = postgres.ColumnList{AttemptsColumn, LastErrorColumn, ResolvedEmailColumn, ResolvedLocaleColumn, CreatedAtColumn, UpdatedAtColumn}
)
return notificationRoutesTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
RouteID: RouteIDColumn,
NotificationID: NotificationIDColumn,
Channel: ChannelColumn,
Status: StatusColumn,
Attempts: AttemptsColumn,
MaxAttempts: MaxAttemptsColumn,
NextAttemptAt: NextAttemptAtColumn,
LastAttemptAt: LastAttemptAtColumn,
LastError: LastErrorColumn,
ResolvedEmail: ResolvedEmailColumn,
ResolvedLocale: ResolvedLocaleColumn,
CreatedAt: CreatedAtColumn,
UpdatedAt: UpdatedAtColumn,
PublishedAt: PublishedAtColumn,
DeadLetteredAt: DeadLetteredAtColumn,
SkippedAt: SkippedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,93 @@
//
// 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 Notifications = newNotificationsTable("backend", "notifications", "")
type notificationsTable struct {
postgres.Table
// Columns
NotificationID postgres.ColumnString
Kind postgres.ColumnString
IdempotencyKey postgres.ColumnString
UserID postgres.ColumnString
Payload postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type NotificationsTable struct {
notificationsTable
EXCLUDED notificationsTable
}
// AS creates new NotificationsTable with assigned alias
func (a NotificationsTable) AS(alias string) *NotificationsTable {
return newNotificationsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new NotificationsTable with assigned schema name
func (a NotificationsTable) FromSchema(schemaName string) *NotificationsTable {
return newNotificationsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new NotificationsTable with assigned table prefix
func (a NotificationsTable) WithPrefix(prefix string) *NotificationsTable {
return newNotificationsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new NotificationsTable with assigned table suffix
func (a NotificationsTable) WithSuffix(suffix string) *NotificationsTable {
return newNotificationsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newNotificationsTable(schemaName, tableName, alias string) *NotificationsTable {
return &NotificationsTable{
notificationsTable: newNotificationsTableImpl(schemaName, tableName, alias),
EXCLUDED: newNotificationsTableImpl("", "excluded", ""),
}
}
func newNotificationsTableImpl(schemaName, tableName, alias string) notificationsTable {
var (
NotificationIDColumn = postgres.StringColumn("notification_id")
KindColumn = postgres.StringColumn("kind")
IdempotencyKeyColumn = postgres.StringColumn("idempotency_key")
UserIDColumn = postgres.StringColumn("user_id")
PayloadColumn = postgres.StringColumn("payload")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
allColumns = postgres.ColumnList{NotificationIDColumn, KindColumn, IdempotencyKeyColumn, UserIDColumn, PayloadColumn, CreatedAtColumn}
mutableColumns = postgres.ColumnList{KindColumn, IdempotencyKeyColumn, UserIDColumn, PayloadColumn, CreatedAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return notificationsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
NotificationID: NotificationIDColumn,
Kind: KindColumn,
IdempotencyKey: IdempotencyKeyColumn,
UserID: UserIDColumn,
Payload: PayloadColumn,
CreatedAt: CreatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,90 @@
//
// 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 PlayerMappings = newPlayerMappingsTable("backend", "player_mappings", "")
type playerMappingsTable struct {
postgres.Table
// Columns
GameID postgres.ColumnString
UserID postgres.ColumnString
RaceName postgres.ColumnString
EnginePlayerUUID postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type PlayerMappingsTable struct {
playerMappingsTable
EXCLUDED playerMappingsTable
}
// AS creates new PlayerMappingsTable with assigned alias
func (a PlayerMappingsTable) AS(alias string) *PlayerMappingsTable {
return newPlayerMappingsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new PlayerMappingsTable with assigned schema name
func (a PlayerMappingsTable) FromSchema(schemaName string) *PlayerMappingsTable {
return newPlayerMappingsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new PlayerMappingsTable with assigned table prefix
func (a PlayerMappingsTable) WithPrefix(prefix string) *PlayerMappingsTable {
return newPlayerMappingsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new PlayerMappingsTable with assigned table suffix
func (a PlayerMappingsTable) WithSuffix(suffix string) *PlayerMappingsTable {
return newPlayerMappingsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newPlayerMappingsTable(schemaName, tableName, alias string) *PlayerMappingsTable {
return &PlayerMappingsTable{
playerMappingsTable: newPlayerMappingsTableImpl(schemaName, tableName, alias),
EXCLUDED: newPlayerMappingsTableImpl("", "excluded", ""),
}
}
func newPlayerMappingsTableImpl(schemaName, tableName, alias string) playerMappingsTable {
var (
GameIDColumn = postgres.StringColumn("game_id")
UserIDColumn = postgres.StringColumn("user_id")
RaceNameColumn = postgres.StringColumn("race_name")
EnginePlayerUUIDColumn = postgres.StringColumn("engine_player_uuid")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
allColumns = postgres.ColumnList{GameIDColumn, UserIDColumn, RaceNameColumn, EnginePlayerUUIDColumn, CreatedAtColumn}
mutableColumns = postgres.ColumnList{RaceNameColumn, EnginePlayerUUIDColumn, CreatedAtColumn}
defaultColumns = postgres.ColumnList{CreatedAtColumn}
)
return playerMappingsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
GameID: GameIDColumn,
UserID: UserIDColumn,
RaceName: RaceNameColumn,
EnginePlayerUUID: EnginePlayerUUIDColumn,
CreatedAt: CreatedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,102 @@
//
// 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 RaceNames = newRaceNamesTable("backend", "race_names", "")
type raceNamesTable struct {
postgres.Table
// Columns
Name postgres.ColumnString
Canonical postgres.ColumnString
Status postgres.ColumnString
OwnerUserID postgres.ColumnString
GameID postgres.ColumnString
SourceGameID postgres.ColumnString
ReservedAt postgres.ColumnTimestampz
ExpiresAt postgres.ColumnTimestampz
RegisteredAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type RaceNamesTable struct {
raceNamesTable
EXCLUDED raceNamesTable
}
// AS creates new RaceNamesTable with assigned alias
func (a RaceNamesTable) AS(alias string) *RaceNamesTable {
return newRaceNamesTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new RaceNamesTable with assigned schema name
func (a RaceNamesTable) FromSchema(schemaName string) *RaceNamesTable {
return newRaceNamesTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new RaceNamesTable with assigned table prefix
func (a RaceNamesTable) WithPrefix(prefix string) *RaceNamesTable {
return newRaceNamesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new RaceNamesTable with assigned table suffix
func (a RaceNamesTable) WithSuffix(suffix string) *RaceNamesTable {
return newRaceNamesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newRaceNamesTable(schemaName, tableName, alias string) *RaceNamesTable {
return &RaceNamesTable{
raceNamesTable: newRaceNamesTableImpl(schemaName, tableName, alias),
EXCLUDED: newRaceNamesTableImpl("", "excluded", ""),
}
}
func newRaceNamesTableImpl(schemaName, tableName, alias string) raceNamesTable {
var (
NameColumn = postgres.StringColumn("name")
CanonicalColumn = postgres.StringColumn("canonical")
StatusColumn = postgres.StringColumn("status")
OwnerUserIDColumn = postgres.StringColumn("owner_user_id")
GameIDColumn = postgres.StringColumn("game_id")
SourceGameIDColumn = postgres.StringColumn("source_game_id")
ReservedAtColumn = postgres.TimestampzColumn("reserved_at")
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
RegisteredAtColumn = postgres.TimestampzColumn("registered_at")
allColumns = postgres.ColumnList{NameColumn, CanonicalColumn, StatusColumn, OwnerUserIDColumn, GameIDColumn, SourceGameIDColumn, ReservedAtColumn, ExpiresAtColumn, RegisteredAtColumn}
mutableColumns = postgres.ColumnList{NameColumn, StatusColumn, OwnerUserIDColumn, SourceGameIDColumn, ReservedAtColumn, ExpiresAtColumn, RegisteredAtColumn}
defaultColumns = postgres.ColumnList{GameIDColumn}
)
return raceNamesTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
Name: NameColumn,
Canonical: CanonicalColumn,
Status: StatusColumn,
OwnerUserID: OwnerUserIDColumn,
GameID: GameIDColumn,
SourceGameID: SourceGameIDColumn,
ReservedAt: ReservedAtColumn,
ExpiresAt: ExpiresAtColumn,
RegisteredAt: RegisteredAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,87 @@
//
// 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 RuntimeHealthSnapshots = newRuntimeHealthSnapshotsTable("backend", "runtime_health_snapshots", "")
type runtimeHealthSnapshotsTable struct {
postgres.Table
// Columns
SnapshotID postgres.ColumnString
GameID postgres.ColumnString
ObservedAt postgres.ColumnTimestampz
Payload postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type RuntimeHealthSnapshotsTable struct {
runtimeHealthSnapshotsTable
EXCLUDED runtimeHealthSnapshotsTable
}
// AS creates new RuntimeHealthSnapshotsTable with assigned alias
func (a RuntimeHealthSnapshotsTable) AS(alias string) *RuntimeHealthSnapshotsTable {
return newRuntimeHealthSnapshotsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new RuntimeHealthSnapshotsTable with assigned schema name
func (a RuntimeHealthSnapshotsTable) FromSchema(schemaName string) *RuntimeHealthSnapshotsTable {
return newRuntimeHealthSnapshotsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new RuntimeHealthSnapshotsTable with assigned table prefix
func (a RuntimeHealthSnapshotsTable) WithPrefix(prefix string) *RuntimeHealthSnapshotsTable {
return newRuntimeHealthSnapshotsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new RuntimeHealthSnapshotsTable with assigned table suffix
func (a RuntimeHealthSnapshotsTable) WithSuffix(suffix string) *RuntimeHealthSnapshotsTable {
return newRuntimeHealthSnapshotsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newRuntimeHealthSnapshotsTable(schemaName, tableName, alias string) *RuntimeHealthSnapshotsTable {
return &RuntimeHealthSnapshotsTable{
runtimeHealthSnapshotsTable: newRuntimeHealthSnapshotsTableImpl(schemaName, tableName, alias),
EXCLUDED: newRuntimeHealthSnapshotsTableImpl("", "excluded", ""),
}
}
func newRuntimeHealthSnapshotsTableImpl(schemaName, tableName, alias string) runtimeHealthSnapshotsTable {
var (
SnapshotIDColumn = postgres.StringColumn("snapshot_id")
GameIDColumn = postgres.StringColumn("game_id")
ObservedAtColumn = postgres.TimestampzColumn("observed_at")
PayloadColumn = postgres.StringColumn("payload")
allColumns = postgres.ColumnList{SnapshotIDColumn, GameIDColumn, ObservedAtColumn, PayloadColumn}
mutableColumns = postgres.ColumnList{GameIDColumn, ObservedAtColumn, PayloadColumn}
defaultColumns = postgres.ColumnList{ObservedAtColumn}
)
return runtimeHealthSnapshotsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
SnapshotID: SnapshotIDColumn,
GameID: GameIDColumn,
ObservedAt: ObservedAtColumn,
Payload: PayloadColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,108 @@
//
// 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 RuntimeOperationLog = newRuntimeOperationLogTable("backend", "runtime_operation_log", "")
type runtimeOperationLogTable struct {
postgres.Table
// Columns
OperationID postgres.ColumnString
GameID postgres.ColumnString
Op postgres.ColumnString
Source postgres.ColumnString
Status postgres.ColumnString
ImageRef postgres.ColumnString
ContainerID postgres.ColumnString
ErrorCode postgres.ColumnString
ErrorMessage postgres.ColumnString
StartedAt postgres.ColumnTimestampz
FinishedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type RuntimeOperationLogTable struct {
runtimeOperationLogTable
EXCLUDED runtimeOperationLogTable
}
// AS creates new RuntimeOperationLogTable with assigned alias
func (a RuntimeOperationLogTable) AS(alias string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new RuntimeOperationLogTable with assigned schema name
func (a RuntimeOperationLogTable) FromSchema(schemaName string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new RuntimeOperationLogTable with assigned table prefix
func (a RuntimeOperationLogTable) WithPrefix(prefix string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new RuntimeOperationLogTable with assigned table suffix
func (a RuntimeOperationLogTable) WithSuffix(suffix string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newRuntimeOperationLogTable(schemaName, tableName, alias string) *RuntimeOperationLogTable {
return &RuntimeOperationLogTable{
runtimeOperationLogTable: newRuntimeOperationLogTableImpl(schemaName, tableName, alias),
EXCLUDED: newRuntimeOperationLogTableImpl("", "excluded", ""),
}
}
func newRuntimeOperationLogTableImpl(schemaName, tableName, alias string) runtimeOperationLogTable {
var (
OperationIDColumn = postgres.StringColumn("operation_id")
GameIDColumn = postgres.StringColumn("game_id")
OpColumn = postgres.StringColumn("op")
SourceColumn = postgres.StringColumn("source")
StatusColumn = postgres.StringColumn("status")
ImageRefColumn = postgres.StringColumn("image_ref")
ContainerIDColumn = postgres.StringColumn("container_id")
ErrorCodeColumn = postgres.StringColumn("error_code")
ErrorMessageColumn = postgres.StringColumn("error_message")
StartedAtColumn = postgres.TimestampzColumn("started_at")
FinishedAtColumn = postgres.TimestampzColumn("finished_at")
allColumns = postgres.ColumnList{OperationIDColumn, GameIDColumn, OpColumn, SourceColumn, StatusColumn, ImageRefColumn, ContainerIDColumn, ErrorCodeColumn, ErrorMessageColumn, StartedAtColumn, FinishedAtColumn}
mutableColumns = postgres.ColumnList{GameIDColumn, OpColumn, SourceColumn, StatusColumn, ImageRefColumn, ContainerIDColumn, ErrorCodeColumn, ErrorMessageColumn, StartedAtColumn, FinishedAtColumn}
defaultColumns = postgres.ColumnList{ImageRefColumn, ContainerIDColumn, ErrorCodeColumn, ErrorMessageColumn, StartedAtColumn}
)
return runtimeOperationLogTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
OperationID: OperationIDColumn,
GameID: GameIDColumn,
Op: OpColumn,
Source: SourceColumn,
Status: StatusColumn,
ImageRef: ImageRefColumn,
ContainerID: ContainerIDColumn,
ErrorCode: ErrorCodeColumn,
ErrorMessage: ErrorMessageColumn,
StartedAt: StartedAtColumn,
FinishedAt: FinishedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,141 @@
//
// 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 RuntimeRecords = newRuntimeRecordsTable("backend", "runtime_records", "")
type runtimeRecordsTable struct {
postgres.Table
// Columns
GameID postgres.ColumnString
Status postgres.ColumnString
CurrentContainerID postgres.ColumnString
CurrentImageRef postgres.ColumnString
CurrentEngineVersion postgres.ColumnString
EngineEndpoint postgres.ColumnString
StatePath postgres.ColumnString
DockerNetwork postgres.ColumnString
TurnSchedule postgres.ColumnString
CurrentTurn postgres.ColumnInteger
NextGenerationAt postgres.ColumnTimestampz
SkipNextTick postgres.ColumnBool
Paused postgres.ColumnBool
PausedAt postgres.ColumnTimestampz
EngineHealth postgres.ColumnString
CreatedAt postgres.ColumnTimestampz
UpdatedAt postgres.ColumnTimestampz
StartedAt postgres.ColumnTimestampz
StoppedAt postgres.ColumnTimestampz
FinishedAt postgres.ColumnTimestampz
RemovedAt postgres.ColumnTimestampz
LastObservedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type RuntimeRecordsTable struct {
runtimeRecordsTable
EXCLUDED runtimeRecordsTable
}
// AS creates new RuntimeRecordsTable with assigned alias
func (a RuntimeRecordsTable) AS(alias string) *RuntimeRecordsTable {
return newRuntimeRecordsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new RuntimeRecordsTable with assigned schema name
func (a RuntimeRecordsTable) FromSchema(schemaName string) *RuntimeRecordsTable {
return newRuntimeRecordsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new RuntimeRecordsTable with assigned table prefix
func (a RuntimeRecordsTable) WithPrefix(prefix string) *RuntimeRecordsTable {
return newRuntimeRecordsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new RuntimeRecordsTable with assigned table suffix
func (a RuntimeRecordsTable) WithSuffix(suffix string) *RuntimeRecordsTable {
return newRuntimeRecordsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newRuntimeRecordsTable(schemaName, tableName, alias string) *RuntimeRecordsTable {
return &RuntimeRecordsTable{
runtimeRecordsTable: newRuntimeRecordsTableImpl(schemaName, tableName, alias),
EXCLUDED: newRuntimeRecordsTableImpl("", "excluded", ""),
}
}
func newRuntimeRecordsTableImpl(schemaName, tableName, alias string) runtimeRecordsTable {
var (
GameIDColumn = postgres.StringColumn("game_id")
StatusColumn = postgres.StringColumn("status")
CurrentContainerIDColumn = postgres.StringColumn("current_container_id")
CurrentImageRefColumn = postgres.StringColumn("current_image_ref")
CurrentEngineVersionColumn = postgres.StringColumn("current_engine_version")
EngineEndpointColumn = postgres.StringColumn("engine_endpoint")
StatePathColumn = postgres.StringColumn("state_path")
DockerNetworkColumn = postgres.StringColumn("docker_network")
TurnScheduleColumn = postgres.StringColumn("turn_schedule")
CurrentTurnColumn = postgres.IntegerColumn("current_turn")
NextGenerationAtColumn = postgres.TimestampzColumn("next_generation_at")
SkipNextTickColumn = postgres.BoolColumn("skip_next_tick")
PausedColumn = postgres.BoolColumn("paused")
PausedAtColumn = postgres.TimestampzColumn("paused_at")
EngineHealthColumn = postgres.StringColumn("engine_health")
CreatedAtColumn = postgres.TimestampzColumn("created_at")
UpdatedAtColumn = postgres.TimestampzColumn("updated_at")
StartedAtColumn = postgres.TimestampzColumn("started_at")
StoppedAtColumn = postgres.TimestampzColumn("stopped_at")
FinishedAtColumn = postgres.TimestampzColumn("finished_at")
RemovedAtColumn = postgres.TimestampzColumn("removed_at")
LastObservedAtColumn = postgres.TimestampzColumn("last_observed_at")
allColumns = postgres.ColumnList{GameIDColumn, StatusColumn, CurrentContainerIDColumn, CurrentImageRefColumn, CurrentEngineVersionColumn, EngineEndpointColumn, StatePathColumn, DockerNetworkColumn, TurnScheduleColumn, CurrentTurnColumn, NextGenerationAtColumn, SkipNextTickColumn, PausedColumn, PausedAtColumn, EngineHealthColumn, CreatedAtColumn, UpdatedAtColumn, StartedAtColumn, StoppedAtColumn, FinishedAtColumn, RemovedAtColumn, LastObservedAtColumn}
mutableColumns = postgres.ColumnList{StatusColumn, CurrentContainerIDColumn, CurrentImageRefColumn, CurrentEngineVersionColumn, EngineEndpointColumn, StatePathColumn, DockerNetworkColumn, TurnScheduleColumn, CurrentTurnColumn, NextGenerationAtColumn, SkipNextTickColumn, PausedColumn, PausedAtColumn, EngineHealthColumn, CreatedAtColumn, UpdatedAtColumn, StartedAtColumn, StoppedAtColumn, FinishedAtColumn, RemovedAtColumn, LastObservedAtColumn}
defaultColumns = postgres.ColumnList{CurrentTurnColumn, SkipNextTickColumn, PausedColumn, EngineHealthColumn, CreatedAtColumn, UpdatedAtColumn}
)
return runtimeRecordsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
GameID: GameIDColumn,
Status: StatusColumn,
CurrentContainerID: CurrentContainerIDColumn,
CurrentImageRef: CurrentImageRefColumn,
CurrentEngineVersion: CurrentEngineVersionColumn,
EngineEndpoint: EngineEndpointColumn,
StatePath: StatePathColumn,
DockerNetwork: DockerNetworkColumn,
TurnSchedule: TurnScheduleColumn,
CurrentTurn: CurrentTurnColumn,
NextGenerationAt: NextGenerationAtColumn,
SkipNextTick: SkipNextTickColumn,
Paused: PausedColumn,
PausedAt: PausedAtColumn,
EngineHealth: EngineHealthColumn,
CreatedAt: CreatedAtColumn,
UpdatedAt: UpdatedAtColumn,
StartedAt: StartedAtColumn,
StoppedAt: StoppedAtColumn,
FinishedAt: FinishedAtColumn,
RemovedAt: RemovedAtColumn,
LastObservedAt: LastObservedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,84 @@
//
// 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 SanctionActive = newSanctionActiveTable("backend", "sanction_active", "")
type sanctionActiveTable struct {
postgres.Table
// Columns
UserID postgres.ColumnString
SanctionCode postgres.ColumnString
RecordID postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type SanctionActiveTable struct {
sanctionActiveTable
EXCLUDED sanctionActiveTable
}
// AS creates new SanctionActiveTable with assigned alias
func (a SanctionActiveTable) AS(alias string) *SanctionActiveTable {
return newSanctionActiveTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new SanctionActiveTable with assigned schema name
func (a SanctionActiveTable) FromSchema(schemaName string) *SanctionActiveTable {
return newSanctionActiveTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new SanctionActiveTable with assigned table prefix
func (a SanctionActiveTable) WithPrefix(prefix string) *SanctionActiveTable {
return newSanctionActiveTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new SanctionActiveTable with assigned table suffix
func (a SanctionActiveTable) WithSuffix(suffix string) *SanctionActiveTable {
return newSanctionActiveTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newSanctionActiveTable(schemaName, tableName, alias string) *SanctionActiveTable {
return &SanctionActiveTable{
sanctionActiveTable: newSanctionActiveTableImpl(schemaName, tableName, alias),
EXCLUDED: newSanctionActiveTableImpl("", "excluded", ""),
}
}
func newSanctionActiveTableImpl(schemaName, tableName, alias string) sanctionActiveTable {
var (
UserIDColumn = postgres.StringColumn("user_id")
SanctionCodeColumn = postgres.StringColumn("sanction_code")
RecordIDColumn = postgres.StringColumn("record_id")
allColumns = postgres.ColumnList{UserIDColumn, SanctionCodeColumn, RecordIDColumn}
mutableColumns = postgres.ColumnList{RecordIDColumn}
defaultColumns = postgres.ColumnList{}
)
return sanctionActiveTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
UserID: UserIDColumn,
SanctionCode: SanctionCodeColumn,
RecordID: RecordIDColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,114 @@
//
// 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 SanctionRecords = newSanctionRecordsTable("backend", "sanction_records", "")
type sanctionRecordsTable struct {
postgres.Table
// Columns
RecordID postgres.ColumnString
UserID postgres.ColumnString
SanctionCode postgres.ColumnString
Scope postgres.ColumnString
ReasonCode postgres.ColumnString
ActorType postgres.ColumnString
ActorID postgres.ColumnString
AppliedAt postgres.ColumnTimestampz
ExpiresAt postgres.ColumnTimestampz
RemovedAt postgres.ColumnTimestampz
RemovedByType postgres.ColumnString
RemovedByID postgres.ColumnString
RemovedReasonCode postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type SanctionRecordsTable struct {
sanctionRecordsTable
EXCLUDED sanctionRecordsTable
}
// AS creates new SanctionRecordsTable with assigned alias
func (a SanctionRecordsTable) AS(alias string) *SanctionRecordsTable {
return newSanctionRecordsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new SanctionRecordsTable with assigned schema name
func (a SanctionRecordsTable) FromSchema(schemaName string) *SanctionRecordsTable {
return newSanctionRecordsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new SanctionRecordsTable with assigned table prefix
func (a SanctionRecordsTable) WithPrefix(prefix string) *SanctionRecordsTable {
return newSanctionRecordsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new SanctionRecordsTable with assigned table suffix
func (a SanctionRecordsTable) WithSuffix(suffix string) *SanctionRecordsTable {
return newSanctionRecordsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newSanctionRecordsTable(schemaName, tableName, alias string) *SanctionRecordsTable {
return &SanctionRecordsTable{
sanctionRecordsTable: newSanctionRecordsTableImpl(schemaName, tableName, alias),
EXCLUDED: newSanctionRecordsTableImpl("", "excluded", ""),
}
}
func newSanctionRecordsTableImpl(schemaName, tableName, alias string) sanctionRecordsTable {
var (
RecordIDColumn = postgres.StringColumn("record_id")
UserIDColumn = postgres.StringColumn("user_id")
SanctionCodeColumn = postgres.StringColumn("sanction_code")
ScopeColumn = postgres.StringColumn("scope")
ReasonCodeColumn = postgres.StringColumn("reason_code")
ActorTypeColumn = postgres.StringColumn("actor_type")
ActorIDColumn = postgres.StringColumn("actor_id")
AppliedAtColumn = postgres.TimestampzColumn("applied_at")
ExpiresAtColumn = postgres.TimestampzColumn("expires_at")
RemovedAtColumn = postgres.TimestampzColumn("removed_at")
RemovedByTypeColumn = postgres.StringColumn("removed_by_type")
RemovedByIDColumn = postgres.StringColumn("removed_by_id")
RemovedReasonCodeColumn = postgres.StringColumn("removed_reason_code")
allColumns = postgres.ColumnList{RecordIDColumn, UserIDColumn, SanctionCodeColumn, ScopeColumn, ReasonCodeColumn, ActorTypeColumn, ActorIDColumn, AppliedAtColumn, ExpiresAtColumn, RemovedAtColumn, RemovedByTypeColumn, RemovedByIDColumn, RemovedReasonCodeColumn}
mutableColumns = postgres.ColumnList{UserIDColumn, SanctionCodeColumn, ScopeColumn, ReasonCodeColumn, ActorTypeColumn, ActorIDColumn, AppliedAtColumn, ExpiresAtColumn, RemovedAtColumn, RemovedByTypeColumn, RemovedByIDColumn, RemovedReasonCodeColumn}
defaultColumns = postgres.ColumnList{AppliedAtColumn}
)
return sanctionRecordsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
RecordID: RecordIDColumn,
UserID: UserIDColumn,
SanctionCode: SanctionCodeColumn,
Scope: ScopeColumn,
ReasonCode: ReasonCodeColumn,
ActorType: ActorTypeColumn,
ActorID: ActorIDColumn,
AppliedAt: AppliedAtColumn,
ExpiresAt: ExpiresAtColumn,
RemovedAt: RemovedAtColumn,
RemovedByType: RemovedByTypeColumn,
RemovedByID: RemovedByIDColumn,
RemovedReasonCode: RemovedReasonCodeColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
@@ -0,0 +1,44 @@
//
// 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
// UseSchema sets a new schema name for all generated table SQL builder types. It is recommended to invoke
// this method only once at the beginning of the program.
func UseSchema(schema string) {
Accounts = Accounts.FromSchema(schema)
AdminAccounts = AdminAccounts.FromSchema(schema)
Applications = Applications.FromSchema(schema)
AuthChallenges = AuthChallenges.FromSchema(schema)
BlockedEmails = BlockedEmails.FromSchema(schema)
DeviceSessions = DeviceSessions.FromSchema(schema)
EngineVersions = EngineVersions.FromSchema(schema)
EntitlementRecords = EntitlementRecords.FromSchema(schema)
EntitlementSnapshots = EntitlementSnapshots.FromSchema(schema)
Games = Games.FromSchema(schema)
Invites = Invites.FromSchema(schema)
LimitActive = LimitActive.FromSchema(schema)
LimitRecords = LimitRecords.FromSchema(schema)
MailAttempts = MailAttempts.FromSchema(schema)
MailDeadLetters = MailDeadLetters.FromSchema(schema)
MailDeliveries = MailDeliveries.FromSchema(schema)
MailPayloads = MailPayloads.FromSchema(schema)
MailRecipients = MailRecipients.FromSchema(schema)
Memberships = Memberships.FromSchema(schema)
NotificationDeadLetters = NotificationDeadLetters.FromSchema(schema)
NotificationMalformedIntents = NotificationMalformedIntents.FromSchema(schema)
NotificationRoutes = NotificationRoutes.FromSchema(schema)
Notifications = Notifications.FromSchema(schema)
PlayerMappings = PlayerMappings.FromSchema(schema)
RaceNames = RaceNames.FromSchema(schema)
RuntimeHealthSnapshots = RuntimeHealthSnapshots.FromSchema(schema)
RuntimeOperationLog = RuntimeOperationLog.FromSchema(schema)
RuntimeRecords = RuntimeRecords.FromSchema(schema)
SanctionActive = SanctionActive.FromSchema(schema)
SanctionRecords = SanctionRecords.FromSchema(schema)
UserCountryCounters = UserCountryCounters.FromSchema(schema)
}
@@ -0,0 +1,87 @@
//
// 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 UserCountryCounters = newUserCountryCountersTable("backend", "user_country_counters", "")
type userCountryCountersTable struct {
postgres.Table
// Columns
UserID postgres.ColumnString
Country postgres.ColumnString
Count postgres.ColumnInteger
LastSeenAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type UserCountryCountersTable struct {
userCountryCountersTable
EXCLUDED userCountryCountersTable
}
// AS creates new UserCountryCountersTable with assigned alias
func (a UserCountryCountersTable) AS(alias string) *UserCountryCountersTable {
return newUserCountryCountersTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new UserCountryCountersTable with assigned schema name
func (a UserCountryCountersTable) FromSchema(schemaName string) *UserCountryCountersTable {
return newUserCountryCountersTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new UserCountryCountersTable with assigned table prefix
func (a UserCountryCountersTable) WithPrefix(prefix string) *UserCountryCountersTable {
return newUserCountryCountersTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new UserCountryCountersTable with assigned table suffix
func (a UserCountryCountersTable) WithSuffix(suffix string) *UserCountryCountersTable {
return newUserCountryCountersTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newUserCountryCountersTable(schemaName, tableName, alias string) *UserCountryCountersTable {
return &UserCountryCountersTable{
userCountryCountersTable: newUserCountryCountersTableImpl(schemaName, tableName, alias),
EXCLUDED: newUserCountryCountersTableImpl("", "excluded", ""),
}
}
func newUserCountryCountersTableImpl(schemaName, tableName, alias string) userCountryCountersTable {
var (
UserIDColumn = postgres.StringColumn("user_id")
CountryColumn = postgres.StringColumn("country")
CountColumn = postgres.IntegerColumn("count")
LastSeenAtColumn = postgres.TimestampzColumn("last_seen_at")
allColumns = postgres.ColumnList{UserIDColumn, CountryColumn, CountColumn, LastSeenAtColumn}
mutableColumns = postgres.ColumnList{CountColumn, LastSeenAtColumn}
defaultColumns = postgres.ColumnList{CountColumn}
)
return userCountryCountersTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
UserID: UserIDColumn,
Country: CountryColumn,
Count: CountColumn,
LastSeenAt: LastSeenAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}
+11
View File
@@ -0,0 +1,11 @@
// Package jet hosts the go-jet/v2 query-builder packages generated from the
// `backend` schema. The generator is driven by `cmd/jetgen` and writes each
// schema's tables, models, views, and enums into the `<schema>` subfolder.
//
// Regenerate with `make jet` from the galaxy/backend module root. The tool
// spins up a transient Postgres container, applies the embedded migrations,
// and rewrites the schema-scoped subdirectory; the package metadata in this
// file is preserved across regenerations.
package jet
//go:generate go run ../../../cmd/jetgen