// // 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 GameMoves = newGameMovesTable("backend", "game_moves", "") type gameMovesTable struct { postgres.Table // Columns GameID postgres.ColumnString Seq postgres.ColumnInteger Seat postgres.ColumnInteger Action postgres.ColumnString Score postgres.ColumnInteger RunningTotal postgres.ColumnInteger ExchangedCount postgres.ColumnInteger Payload postgres.ColumnString CreatedAt postgres.ColumnTimestampz AllColumns postgres.ColumnList MutableColumns postgres.ColumnList DefaultColumns postgres.ColumnList } type GameMovesTable struct { gameMovesTable EXCLUDED gameMovesTable } // AS creates new GameMovesTable with assigned alias func (a GameMovesTable) AS(alias string) *GameMovesTable { return newGameMovesTable(a.SchemaName(), a.TableName(), alias) } // Schema creates new GameMovesTable with assigned schema name func (a GameMovesTable) FromSchema(schemaName string) *GameMovesTable { return newGameMovesTable(schemaName, a.TableName(), a.Alias()) } // WithPrefix creates new GameMovesTable with assigned table prefix func (a GameMovesTable) WithPrefix(prefix string) *GameMovesTable { return newGameMovesTable(a.SchemaName(), prefix+a.TableName(), a.TableName()) } // WithSuffix creates new GameMovesTable with assigned table suffix func (a GameMovesTable) WithSuffix(suffix string) *GameMovesTable { return newGameMovesTable(a.SchemaName(), a.TableName()+suffix, a.TableName()) } func newGameMovesTable(schemaName, tableName, alias string) *GameMovesTable { return &GameMovesTable{ gameMovesTable: newGameMovesTableImpl(schemaName, tableName, alias), EXCLUDED: newGameMovesTableImpl("", "excluded", ""), } } func newGameMovesTableImpl(schemaName, tableName, alias string) gameMovesTable { var ( GameIDColumn = postgres.StringColumn("game_id") SeqColumn = postgres.IntegerColumn("seq") SeatColumn = postgres.IntegerColumn("seat") ActionColumn = postgres.StringColumn("action") ScoreColumn = postgres.IntegerColumn("score") RunningTotalColumn = postgres.IntegerColumn("running_total") ExchangedCountColumn = postgres.IntegerColumn("exchanged_count") PayloadColumn = postgres.StringColumn("payload") CreatedAtColumn = postgres.TimestampzColumn("created_at") allColumns = postgres.ColumnList{GameIDColumn, SeqColumn, SeatColumn, ActionColumn, ScoreColumn, RunningTotalColumn, ExchangedCountColumn, PayloadColumn, CreatedAtColumn} mutableColumns = postgres.ColumnList{SeatColumn, ActionColumn, ScoreColumn, RunningTotalColumn, ExchangedCountColumn, PayloadColumn, CreatedAtColumn} defaultColumns = postgres.ColumnList{ScoreColumn, RunningTotalColumn, ExchangedCountColumn, PayloadColumn, CreatedAtColumn} ) return gameMovesTable{ Table: postgres.NewTable(schemaName, tableName, alias, allColumns...), //Columns GameID: GameIDColumn, Seq: SeqColumn, Seat: SeatColumn, Action: ActionColumn, Score: ScoreColumn, RunningTotal: RunningTotalColumn, ExchangedCount: ExchangedCountColumn, Payload: PayloadColumn, CreatedAt: CreatedAtColumn, AllColumns: allColumns, MutableColumns: mutableColumns, DefaultColumns: defaultColumns, } }