2019-07-17 13:22:14 +02:00
|
|
|
//
|
|
|
|
|
// 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 (
|
2026-05-14 16:26:47 +00:00
|
|
|
"source.gleipnir.technology/Gleipnir/jet/postgres"
|
2019-07-17 13:22:14 +02:00
|
|
|
)
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
var FilmActor = newFilmActorTable("dvds", "film_actor", "")
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
type filmActorTable struct {
|
2019-08-08 12:02:32 +02:00
|
|
|
postgres.Table
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2025-10-16 15:09:07 +02:00
|
|
|
// Columns
|
2019-08-08 12:02:32 +02:00
|
|
|
ActorID postgres.ColumnInteger
|
|
|
|
|
FilmID postgres.ColumnInteger
|
|
|
|
|
LastUpdate postgres.ColumnTimestamp
|
2019-07-17 13:22:14 +02:00
|
|
|
|
2019-09-26 12:31:03 +02:00
|
|
|
AllColumns postgres.ColumnList
|
|
|
|
|
MutableColumns postgres.ColumnList
|
2025-10-16 15:09:07 +02:00
|
|
|
DefaultColumns postgres.ColumnList
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
type FilmActorTable struct {
|
|
|
|
|
filmActorTable
|
|
|
|
|
|
|
|
|
|
EXCLUDED filmActorTable
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AS creates new FilmActorTable with assigned alias
|
2021-03-21 17:18:43 +01:00
|
|
|
func (a FilmActorTable) AS(alias string) *FilmActorTable {
|
|
|
|
|
return newFilmActorTable(a.SchemaName(), a.TableName(), alias)
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
// Schema creates new FilmActorTable with assigned schema name
|
|
|
|
|
func (a FilmActorTable) FromSchema(schemaName string) *FilmActorTable {
|
|
|
|
|
return newFilmActorTable(schemaName, a.TableName(), a.Alias())
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-16 22:47:34 +08:00
|
|
|
// WithPrefix creates new FilmActorTable with assigned table prefix
|
|
|
|
|
func (a FilmActorTable) WithPrefix(prefix string) *FilmActorTable {
|
|
|
|
|
return newFilmActorTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WithSuffix creates new FilmActorTable with assigned table suffix
|
|
|
|
|
func (a FilmActorTable) WithSuffix(suffix string) *FilmActorTable {
|
|
|
|
|
return newFilmActorTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
func newFilmActorTable(schemaName, tableName, alias string) *FilmActorTable {
|
2020-05-31 10:42:55 +02:00
|
|
|
return &FilmActorTable{
|
2021-03-21 17:18:43 +01:00
|
|
|
filmActorTable: newFilmActorTableImpl(schemaName, tableName, alias),
|
|
|
|
|
EXCLUDED: newFilmActorTableImpl("", "excluded", ""),
|
2020-05-31 10:42:55 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-21 17:18:43 +01:00
|
|
|
func newFilmActorTableImpl(schemaName, tableName, alias string) filmActorTable {
|
2019-07-17 13:22:14 +02:00
|
|
|
var (
|
2019-08-08 12:02:32 +02:00
|
|
|
ActorIDColumn = postgres.IntegerColumn("actor_id")
|
|
|
|
|
FilmIDColumn = postgres.IntegerColumn("film_id")
|
|
|
|
|
LastUpdateColumn = postgres.TimestampColumn("last_update")
|
2020-05-31 10:42:55 +02:00
|
|
|
allColumns = postgres.ColumnList{ActorIDColumn, FilmIDColumn, LastUpdateColumn}
|
|
|
|
|
mutableColumns = postgres.ColumnList{LastUpdateColumn}
|
2025-10-16 15:09:07 +02:00
|
|
|
defaultColumns = postgres.ColumnList{LastUpdateColumn}
|
2019-07-17 13:22:14 +02:00
|
|
|
)
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
return filmActorTable{
|
2021-03-21 17:18:43 +01:00
|
|
|
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
|
2019-07-17 13:22:14 +02:00
|
|
|
|
|
|
|
|
//Columns
|
|
|
|
|
ActorID: ActorIDColumn,
|
|
|
|
|
FilmID: FilmIDColumn,
|
|
|
|
|
LastUpdate: LastUpdateColumn,
|
|
|
|
|
|
2020-05-31 10:42:55 +02:00
|
|
|
AllColumns: allColumns,
|
|
|
|
|
MutableColumns: mutableColumns,
|
2025-10-16 15:09:07 +02:00
|
|
|
DefaultColumns: defaultColumns,
|
2019-07-17 13:22:14 +02:00
|
|
|
}
|
|
|
|
|
}
|