jet/examples/quick-start/.gen/jetdb/dvds/table/film_actor.go

57 lines
1.3 KiB
Go
Raw Normal View History

2019-07-17 13:22:14 +02:00
//
// Code generated by go-jet DO NOT EDIT.
2019-08-08 12:02:32 +02:00
// Generated at Thursday, 08-Aug-19 16:59:58 CEST
2019-07-17 13:22:14 +02:00
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//
package table
import (
2019-08-08 12:02:32 +02:00
"github.com/go-jet/jet/postgres"
2019-07-17 13:22:14 +02:00
)
var FilmActor = newFilmActorTable()
type FilmActorTable struct {
2019-08-08 12:02:32 +02:00
postgres.Table
2019-07-17 13:22:14 +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-08-08 12:02:32 +02:00
AllColumns postgres.IColumnList
MutableColumns postgres.IColumnList
2019-07-17 13:22:14 +02:00
}
// creates new FilmActorTable with assigned alias
func (a *FilmActorTable) AS(alias string) *FilmActorTable {
aliasTable := newFilmActorTable()
aliasTable.Table.AS(alias)
return aliasTable
}
func newFilmActorTable() *FilmActorTable {
var (
2019-08-08 12:02:32 +02:00
ActorIDColumn = postgres.IntegerColumn("actor_id")
FilmIDColumn = postgres.IntegerColumn("film_id")
LastUpdateColumn = postgres.TimestampColumn("last_update")
2019-07-17 13:22:14 +02:00
)
return &FilmActorTable{
2019-08-08 12:02:32 +02:00
Table: postgres.NewTable("dvds", "film_actor", ActorIDColumn, FilmIDColumn, LastUpdateColumn),
2019-07-17 13:22:14 +02:00
//Columns
ActorID: ActorIDColumn,
FilmID: FilmIDColumn,
LastUpdate: LastUpdateColumn,
2019-08-08 12:02:32 +02:00
AllColumns: postgres.ColumnList(ActorIDColumn, FilmIDColumn, LastUpdateColumn),
MutableColumns: postgres.ColumnList(LastUpdateColumn),
2019-07-17 13:22:14 +02:00
}
}