// Code generated by ent, DO NOT EDIT. package stationterminalevent import ( "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the stationterminalevent type in the database. Label = "station_terminal_event" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldStationNo holds the string denoting the stationno field in the database. FieldStationNo = "station_no" // FieldEvent holds the string denoting the event field in the database. FieldEvent = "event" // FieldLoggedIn holds the string denoting the loggedin field in the database. FieldLoggedIn = "logged_in" // FieldPowered holds the string denoting the powered field in the database. FieldPowered = "powered" // FieldOperator holds the string denoting the operator field in the database. FieldOperator = "operator" // FieldDetail holds the string denoting the detail field in the database. FieldDetail = "detail" // FieldCreatedAt holds the string denoting the createdat field in the database. FieldCreatedAt = "created_at" // Table holds the table name of the stationterminalevent in the database. Table = "station_terminal_event" ) // Columns holds all SQL columns for stationterminalevent fields. var Columns = []string{ FieldID, FieldStationNo, FieldEvent, FieldLoggedIn, FieldPowered, FieldOperator, FieldDetail, FieldCreatedAt, } // ValidColumn reports if the column name is valid (part of the table columns). func ValidColumn(column string) bool { for i := range Columns { if column == Columns[i] { return true } } return false } var ( // EventValidator is a validator for the "event" field. It is called by the builders before save. EventValidator func(string) error // DefaultLoggedIn holds the default value on creation for the "loggedIn" field. DefaultLoggedIn bool // DefaultPowered holds the default value on creation for the "powered" field. DefaultPowered bool // DefaultOperator holds the default value on creation for the "operator" field. DefaultOperator string // OperatorValidator is a validator for the "operator" field. It is called by the builders before save. OperatorValidator func(string) error // DefaultDetail holds the default value on creation for the "detail" field. DefaultDetail string // DetailValidator is a validator for the "detail" field. It is called by the builders before save. DetailValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "createdAt" field. DefaultCreatedAt int64 // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(int) error ) // OrderOption defines the ordering options for the StationTerminalEvent queries. type OrderOption func(*sql.Selector) // ByID orders the results by the id field. func ByID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldID, opts...).ToFunc() } // ByStationNo orders the results by the stationNo field. func ByStationNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStationNo, opts...).ToFunc() } // ByEvent orders the results by the event field. func ByEvent(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEvent, opts...).ToFunc() } // ByLoggedIn orders the results by the loggedIn field. func ByLoggedIn(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLoggedIn, opts...).ToFunc() } // ByPowered orders the results by the powered field. func ByPowered(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPowered, opts...).ToFunc() } // ByOperator orders the results by the operator field. func ByOperator(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOperator, opts...).ToFunc() } // ByDetail orders the results by the detail field. func ByDetail(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDetail, opts...).ToFunc() } // ByCreatedAt orders the results by the createdAt field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() }