60 lines
1.5 KiB
Go
60 lines
1.5 KiB
Go
|
|
//
|
||
|
|
// Code generated by go-jet DO NOT EDIT.
|
||
|
|
// Generated at Thursday, 26-Sep-19 12:02:13 CEST
|
||
|
|
//
|
||
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
||
|
|
// and will be lost if the code is regenerated
|
||
|
|
//
|
||
|
|
|
||
|
|
package view
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/go-jet/jet/postgres"
|
||
|
|
)
|
||
|
|
|
||
|
|
var ActorInfo = newActorInfoTable()
|
||
|
|
|
||
|
|
type ActorInfoTable struct {
|
||
|
|
postgres.Table
|
||
|
|
|
||
|
|
//Columns
|
||
|
|
ActorID postgres.ColumnInteger
|
||
|
|
FirstName postgres.ColumnString
|
||
|
|
LastName postgres.ColumnString
|
||
|
|
FilmInfo postgres.ColumnString
|
||
|
|
|
||
|
|
AllColumns postgres.ColumnList
|
||
|
|
MutableColumns postgres.ColumnList
|
||
|
|
}
|
||
|
|
|
||
|
|
// creates new ActorInfoTable with assigned alias
|
||
|
|
func (a *ActorInfoTable) AS(alias string) *ActorInfoTable {
|
||
|
|
aliasTable := newActorInfoTable()
|
||
|
|
|
||
|
|
aliasTable.Table.AS(alias)
|
||
|
|
|
||
|
|
return aliasTable
|
||
|
|
}
|
||
|
|
|
||
|
|
func newActorInfoTable() *ActorInfoTable {
|
||
|
|
var (
|
||
|
|
ActorIDColumn = postgres.IntegerColumn("actor_id")
|
||
|
|
FirstNameColumn = postgres.StringColumn("first_name")
|
||
|
|
LastNameColumn = postgres.StringColumn("last_name")
|
||
|
|
FilmInfoColumn = postgres.StringColumn("film_info")
|
||
|
|
)
|
||
|
|
|
||
|
|
return &ActorInfoTable{
|
||
|
|
Table: postgres.NewTable("dvds", "actor_info", ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn),
|
||
|
|
|
||
|
|
//Columns
|
||
|
|
ActorID: ActorIDColumn,
|
||
|
|
FirstName: FirstNameColumn,
|
||
|
|
LastName: LastNameColumn,
|
||
|
|
FilmInfo: FilmInfoColumn,
|
||
|
|
|
||
|
|
AllColumns: postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn},
|
||
|
|
MutableColumns: postgres.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, FilmInfoColumn},
|
||
|
|
}
|
||
|
|
}
|