//
// Code generated by go-jet DO NOT EDIT.
// Generated at Wednesday, 17-Jul-19 13:11:01 CEST
//
// 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"
)

var Actor = newActorTable()

type ActorTable struct {
	jet.Table

	//Columns
	ActorID    jet.ColumnInteger
	FirstName  jet.ColumnString
	LastName   jet.ColumnString
	LastUpdate jet.ColumnTimestamp

	AllColumns     jet.ColumnList
	MutableColumns jet.ColumnList
}

// creates new ActorTable with assigned alias
func (a *ActorTable) AS(alias string) *ActorTable {
	aliasTable := newActorTable()

	aliasTable.Table.AS(alias)

	return aliasTable
}

func newActorTable() *ActorTable {
	var (
		ActorIDColumn    = jet.IntegerColumn("actor_id")
		FirstNameColumn  = jet.StringColumn("first_name")
		LastNameColumn   = jet.StringColumn("last_name")
		LastUpdateColumn = jet.TimestampColumn("last_update")
	)

	return &ActorTable{
		Table: jet.NewTable("dvds", "actor", ActorIDColumn, FirstNameColumn, LastNameColumn, LastUpdateColumn),

		//Columns
		ActorID:    ActorIDColumn,
		FirstName:  FirstNameColumn,
		LastName:   LastNameColumn,
		LastUpdate: LastUpdateColumn,

		AllColumns:     jet.ColumnList{ActorIDColumn, FirstNameColumn, LastNameColumn, LastUpdateColumn},
		MutableColumns: jet.ColumnList{FirstNameColumn, LastNameColumn, LastUpdateColumn},
	}
}
