Files
bj_power/bj_power_mes/ent/stationterminalstate/stationterminalstate.go
T

115 lines
4.0 KiB
Go
Raw Normal View History

// Code generated by ent, DO NOT EDIT.
package stationterminalstate
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the stationterminalstate type in the database.
Label = "station_terminal_state"
// 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"
// FieldPowered holds the string denoting the powered field in the database.
FieldPowered = "powered"
// FieldLoggedIn holds the string denoting the loggedin field in the database.
FieldLoggedIn = "logged_in"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldPaused holds the string denoting the paused field in the database.
FieldPaused = "paused"
// FieldLastHeartbeatAt holds the string denoting the lastheartbeatat field in the database.
FieldLastHeartbeatAt = "last_heartbeat_at"
// FieldUpdatedAt holds the string denoting the updatedat field in the database.
FieldUpdatedAt = "updated_at"
// Table holds the table name of the stationterminalstate in the database.
Table = "station_terminal_state"
)
// Columns holds all SQL columns for stationterminalstate fields.
var Columns = []string{
FieldID,
FieldStationNo,
FieldPowered,
FieldLoggedIn,
FieldOperator,
FieldPaused,
FieldLastHeartbeatAt,
FieldUpdatedAt,
}
// 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 (
// DefaultPowered holds the default value on creation for the "powered" field.
DefaultPowered bool
// DefaultLoggedIn holds the default value on creation for the "loggedIn" field.
DefaultLoggedIn 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
// DefaultPaused holds the default value on creation for the "paused" field.
DefaultPaused bool
// DefaultLastHeartbeatAt holds the default value on creation for the "lastHeartbeatAt" field.
DefaultLastHeartbeatAt int64
// DefaultUpdatedAt holds the default value on creation for the "updatedAt" field.
DefaultUpdatedAt 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 StationTerminalState 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()
}
// ByPowered orders the results by the powered field.
func ByPowered(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPowered, opts...).ToFunc()
}
// ByLoggedIn orders the results by the loggedIn field.
func ByLoggedIn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLoggedIn, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByPaused orders the results by the paused field.
func ByPaused(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPaused, opts...).ToFunc()
}
// ByLastHeartbeatAt orders the results by the lastHeartbeatAt field.
func ByLastHeartbeatAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLastHeartbeatAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updatedAt field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}