91 lines
3.0 KiB
Go
91 lines
3.0 KiB
Go
//
|
|
// Code generated by go-jet DO NOT EDIT.
|
|
//
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
|
// and will be lost if the code is regenerated
|
|
//
|
|
|
|
package table
|
|
|
|
import (
|
|
"github.com/go-jet/jet/v2/postgres"
|
|
)
|
|
|
|
var TenantUserBalances = newTenantUserBalancesTable("public", "tenant_user_balances", "")
|
|
|
|
type tenantUserBalancesTable struct {
|
|
postgres.Table
|
|
|
|
// Columns
|
|
ID postgres.ColumnInteger
|
|
CreatedAt postgres.ColumnTimestamp
|
|
UpdatedAt postgres.ColumnTimestamp
|
|
TenantID postgres.ColumnInteger
|
|
UserID postgres.ColumnInteger
|
|
Balance postgres.ColumnInteger
|
|
|
|
AllColumns postgres.ColumnList
|
|
MutableColumns postgres.ColumnList
|
|
}
|
|
|
|
type TenantUserBalancesTable struct {
|
|
tenantUserBalancesTable
|
|
|
|
EXCLUDED tenantUserBalancesTable
|
|
}
|
|
|
|
// AS creates new TenantUserBalancesTable with assigned alias
|
|
func (a TenantUserBalancesTable) AS(alias string) *TenantUserBalancesTable {
|
|
return newTenantUserBalancesTable(a.SchemaName(), a.TableName(), alias)
|
|
}
|
|
|
|
// Schema creates new TenantUserBalancesTable with assigned schema name
|
|
func (a TenantUserBalancesTable) FromSchema(schemaName string) *TenantUserBalancesTable {
|
|
return newTenantUserBalancesTable(schemaName, a.TableName(), a.Alias())
|
|
}
|
|
|
|
// WithPrefix creates new TenantUserBalancesTable with assigned table prefix
|
|
func (a TenantUserBalancesTable) WithPrefix(prefix string) *TenantUserBalancesTable {
|
|
return newTenantUserBalancesTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
|
}
|
|
|
|
// WithSuffix creates new TenantUserBalancesTable with assigned table suffix
|
|
func (a TenantUserBalancesTable) WithSuffix(suffix string) *TenantUserBalancesTable {
|
|
return newTenantUserBalancesTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
|
}
|
|
|
|
func newTenantUserBalancesTable(schemaName, tableName, alias string) *TenantUserBalancesTable {
|
|
return &TenantUserBalancesTable{
|
|
tenantUserBalancesTable: newTenantUserBalancesTableImpl(schemaName, tableName, alias),
|
|
EXCLUDED: newTenantUserBalancesTableImpl("", "excluded", ""),
|
|
}
|
|
}
|
|
|
|
func newTenantUserBalancesTableImpl(schemaName, tableName, alias string) tenantUserBalancesTable {
|
|
var (
|
|
IDColumn = postgres.IntegerColumn("id")
|
|
CreatedAtColumn = postgres.TimestampColumn("created_at")
|
|
UpdatedAtColumn = postgres.TimestampColumn("updated_at")
|
|
TenantIDColumn = postgres.IntegerColumn("tenant_id")
|
|
UserIDColumn = postgres.IntegerColumn("user_id")
|
|
BalanceColumn = postgres.IntegerColumn("balance")
|
|
allColumns = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, TenantIDColumn, UserIDColumn, BalanceColumn}
|
|
mutableColumns = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, TenantIDColumn, UserIDColumn, BalanceColumn}
|
|
)
|
|
|
|
return tenantUserBalancesTable{
|
|
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
|
|
|
//Columns
|
|
ID: IDColumn,
|
|
CreatedAt: CreatedAtColumn,
|
|
UpdatedAt: UpdatedAtColumn,
|
|
TenantID: TenantIDColumn,
|
|
UserID: UserIDColumn,
|
|
Balance: BalanceColumn,
|
|
|
|
AllColumns: allColumns,
|
|
MutableColumns: mutableColumns,
|
|
}
|
|
}
|