// // 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 AccountRisk = newAccountRiskTable("payments", "account_risk", "") type accountRiskTable struct { postgres.Table // Columns AccountID postgres.ColumnString Abuse postgres.ColumnBool LossChips postgres.ColumnInteger UpdatedAt postgres.ColumnTimestampz AllColumns postgres.ColumnList MutableColumns postgres.ColumnList DefaultColumns postgres.ColumnList } type AccountRiskTable struct { accountRiskTable EXCLUDED accountRiskTable } // AS creates new AccountRiskTable with assigned alias func (a AccountRiskTable) AS(alias string) *AccountRiskTable { return newAccountRiskTable(a.SchemaName(), a.TableName(), alias) } // Schema creates new AccountRiskTable with assigned schema name func (a AccountRiskTable) FromSchema(schemaName string) *AccountRiskTable { return newAccountRiskTable(schemaName, a.TableName(), a.Alias()) } // WithPrefix creates new AccountRiskTable with assigned table prefix func (a AccountRiskTable) WithPrefix(prefix string) *AccountRiskTable { return newAccountRiskTable(a.SchemaName(), prefix+a.TableName(), a.TableName()) } // WithSuffix creates new AccountRiskTable with assigned table suffix func (a AccountRiskTable) WithSuffix(suffix string) *AccountRiskTable { return newAccountRiskTable(a.SchemaName(), a.TableName()+suffix, a.TableName()) } func newAccountRiskTable(schemaName, tableName, alias string) *AccountRiskTable { return &AccountRiskTable{ accountRiskTable: newAccountRiskTableImpl(schemaName, tableName, alias), EXCLUDED: newAccountRiskTableImpl("", "excluded", ""), } } func newAccountRiskTableImpl(schemaName, tableName, alias string) accountRiskTable { var ( AccountIDColumn = postgres.StringColumn("account_id") AbuseColumn = postgres.BoolColumn("abuse") LossChipsColumn = postgres.IntegerColumn("loss_chips") UpdatedAtColumn = postgres.TimestampzColumn("updated_at") allColumns = postgres.ColumnList{AccountIDColumn, AbuseColumn, LossChipsColumn, UpdatedAtColumn} mutableColumns = postgres.ColumnList{AbuseColumn, LossChipsColumn, UpdatedAtColumn} defaultColumns = postgres.ColumnList{AbuseColumn, LossChipsColumn, UpdatedAtColumn} ) return accountRiskTable{ Table: postgres.NewTable(schemaName, tableName, alias, allColumns...), //Columns AccountID: AccountIDColumn, Abuse: AbuseColumn, LossChips: LossChipsColumn, UpdatedAt: UpdatedAtColumn, AllColumns: allColumns, MutableColumns: mutableColumns, DefaultColumns: defaultColumns, } }