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

109 lines
3.7 KiB
Go
Raw Normal View History

2026-08-28 15:06:01 +08:00
// Code generated by ent, DO NOT EDIT.
package stationprocess
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the stationprocess type in the database.
Label = "station_process"
// 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"
// FieldProcessCode holds the string denoting the processcode field in the database.
FieldProcessCode = "process_code"
// FieldEffectDate holds the string denoting the effectdate field in the database.
FieldEffectDate = "effect_date"
// FieldShift holds the string denoting the shift field in the database.
FieldShift = "shift"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the stationprocess in the database.
Table = "station_process"
)
// Columns holds all SQL columns for stationprocess fields.
var Columns = []string{
FieldID,
FieldStationNo,
FieldProcessCode,
FieldEffectDate,
FieldShift,
FieldOperator,
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 (
// DefaultEffectDate holds the default value on creation for the "effectDate" field.
DefaultEffectDate string
// EffectDateValidator is a validator for the "effectDate" field. It is called by the builders before save.
EffectDateValidator func(string) error
// DefaultShift holds the default value on creation for the "shift" field.
DefaultShift string
// ShiftValidator is a validator for the "shift" field. It is called by the builders before save.
ShiftValidator func(string) error
// 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
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt func() time.Time
// 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 StationProcess 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()
}
// ByProcessCode orders the results by the processCode field.
func ByProcessCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProcessCode, opts...).ToFunc()
}
// ByEffectDate orders the results by the effectDate field.
func ByEffectDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEffectDate, opts...).ToFunc()
}
// ByShift orders the results by the shift field.
func ByShift(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldShift, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}