Files
bj_power/bj_power_mes/ent/associationtrace/associationtrace.go
T
2026-08-28 15:06:01 +08:00

109 lines
3.9 KiB
Go

// Code generated by ent, DO NOT EDIT.
package associationtrace
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the associationtrace type in the database.
Label = "association_trace"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldFinishedSn holds the string denoting the finishedsn field in the database.
FieldFinishedSn = "finished_sn"
// FieldOrderNo holds the string denoting the orderno field in the database.
FieldOrderNo = "order_no"
// FieldProcessCode holds the string denoting the processcode field in the database.
FieldProcessCode = "process_code"
// FieldBatchItems holds the string denoting the batchitems field in the database.
FieldBatchItems = "batch_items"
// FieldSerialItems holds the string denoting the serialitems field in the database.
FieldSerialItems = "serial_items"
// 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 associationtrace in the database.
Table = "association_trace"
)
// Columns holds all SQL columns for associationtrace fields.
var Columns = []string{
FieldID,
FieldFinishedSn,
FieldOrderNo,
FieldProcessCode,
FieldBatchItems,
FieldSerialItems,
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 (
// FinishedSnValidator is a validator for the "finishedSn" field. It is called by the builders before save.
FinishedSnValidator func(string) error
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
DefaultOrderNo string
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
OrderNoValidator func(string) error
// DefaultProcessCode holds the default value on creation for the "processCode" field.
DefaultProcessCode string
// ProcessCodeValidator is a validator for the "processCode" field. It is called by the builders before save.
ProcessCodeValidator 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 AssociationTrace 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()
}
// ByFinishedSn orders the results by the finishedSn field.
func ByFinishedSn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFinishedSn, opts...).ToFunc()
}
// ByOrderNo orders the results by the orderNo field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// ByProcessCode orders the results by the processCode field.
func ByProcessCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProcessCode, 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()
}