// // 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 Orders = newOrdersTable("payments", "orders", "") type ordersTable struct { postgres.Table // Columns OrderID postgres.ColumnString AccountID postgres.ColumnString Platform postgres.ColumnString ProductID postgres.ColumnString ExpectedAmount postgres.ColumnInteger Currency postgres.ColumnString Origin postgres.ColumnString Status postgres.ColumnString Provider postgres.ColumnString ProviderPaymentID postgres.ColumnString CreatedAt postgres.ColumnTimestampz UpdatedAt postgres.ColumnTimestampz AllColumns postgres.ColumnList MutableColumns postgres.ColumnList DefaultColumns postgres.ColumnList } type OrdersTable struct { ordersTable EXCLUDED ordersTable } // AS creates new OrdersTable with assigned alias func (a OrdersTable) AS(alias string) *OrdersTable { return newOrdersTable(a.SchemaName(), a.TableName(), alias) } // Schema creates new OrdersTable with assigned schema name func (a OrdersTable) FromSchema(schemaName string) *OrdersTable { return newOrdersTable(schemaName, a.TableName(), a.Alias()) } // WithPrefix creates new OrdersTable with assigned table prefix func (a OrdersTable) WithPrefix(prefix string) *OrdersTable { return newOrdersTable(a.SchemaName(), prefix+a.TableName(), a.TableName()) } // WithSuffix creates new OrdersTable with assigned table suffix func (a OrdersTable) WithSuffix(suffix string) *OrdersTable { return newOrdersTable(a.SchemaName(), a.TableName()+suffix, a.TableName()) } func newOrdersTable(schemaName, tableName, alias string) *OrdersTable { return &OrdersTable{ ordersTable: newOrdersTableImpl(schemaName, tableName, alias), EXCLUDED: newOrdersTableImpl("", "excluded", ""), } } func newOrdersTableImpl(schemaName, tableName, alias string) ordersTable { var ( OrderIDColumn = postgres.StringColumn("order_id") AccountIDColumn = postgres.StringColumn("account_id") PlatformColumn = postgres.StringColumn("platform") ProductIDColumn = postgres.StringColumn("product_id") ExpectedAmountColumn = postgres.IntegerColumn("expected_amount") CurrencyColumn = postgres.StringColumn("currency") OriginColumn = postgres.StringColumn("origin") StatusColumn = postgres.StringColumn("status") ProviderColumn = postgres.StringColumn("provider") ProviderPaymentIDColumn = postgres.StringColumn("provider_payment_id") CreatedAtColumn = postgres.TimestampzColumn("created_at") UpdatedAtColumn = postgres.TimestampzColumn("updated_at") allColumns = postgres.ColumnList{OrderIDColumn, AccountIDColumn, PlatformColumn, ProductIDColumn, ExpectedAmountColumn, CurrencyColumn, OriginColumn, StatusColumn, ProviderColumn, ProviderPaymentIDColumn, CreatedAtColumn, UpdatedAtColumn} mutableColumns = postgres.ColumnList{AccountIDColumn, PlatformColumn, ProductIDColumn, ExpectedAmountColumn, CurrencyColumn, OriginColumn, StatusColumn, ProviderColumn, ProviderPaymentIDColumn, CreatedAtColumn, UpdatedAtColumn} defaultColumns = postgres.ColumnList{StatusColumn, CreatedAtColumn, UpdatedAtColumn} ) return ordersTable{ Table: postgres.NewTable(schemaName, tableName, alias, allColumns...), //Columns OrderID: OrderIDColumn, AccountID: AccountIDColumn, Platform: PlatformColumn, ProductID: ProductIDColumn, ExpectedAmount: ExpectedAmountColumn, Currency: CurrencyColumn, Origin: OriginColumn, Status: StatusColumn, Provider: ProviderColumn, ProviderPaymentID: ProviderPaymentIDColumn, CreatedAt: CreatedAtColumn, UpdatedAt: UpdatedAtColumn, AllColumns: allColumns, MutableColumns: mutableColumns, DefaultColumns: defaultColumns, } }