//
// 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 Category = newCategoryTable()

type CategoryTable struct {
	jet.Table

	//Columns
	CategoryID jet.ColumnInteger
	Name       jet.ColumnString
	LastUpdate jet.ColumnTimestamp

	AllColumns     jet.ColumnList
	MutableColumns jet.ColumnList
}

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

	aliasTable.Table.AS(alias)

	return aliasTable
}

func newCategoryTable() *CategoryTable {
	var (
		CategoryIDColumn = jet.IntegerColumn("category_id")
		NameColumn       = jet.StringColumn("name")
		LastUpdateColumn = jet.TimestampColumn("last_update")
	)

	return &CategoryTable{
		Table: jet.NewTable("dvds", "category", CategoryIDColumn, NameColumn, LastUpdateColumn),

		//Columns
		CategoryID: CategoryIDColumn,
		Name:       NameColumn,
		LastUpdate: LastUpdateColumn,

		AllColumns:     jet.ColumnList{CategoryIDColumn, NameColumn, LastUpdateColumn},
		MutableColumns: jet.ColumnList{NameColumn, LastUpdateColumn},
	}
}
