初始化2
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package semiflow
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the semiflow type in the database.
|
||||
Label = "semi_flow"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldSn holds the string denoting the sn field in the database.
|
||||
FieldSn = "sn"
|
||||
// FieldOrderNo holds the string denoting the orderno field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldDoneProcessCodes holds the string denoting the doneprocesscodes field in the database.
|
||||
FieldDoneProcessCodes = "done_process_codes"
|
||||
// FieldAction holds the string denoting the action field in the database.
|
||||
FieldAction = "action"
|
||||
// FieldTargetDock holds the string denoting the targetdock field in the database.
|
||||
FieldTargetDock = "target_dock"
|
||||
// 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 semiflow in the database.
|
||||
Table = "semi_flow"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for semiflow fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldSn,
|
||||
FieldOrderNo,
|
||||
FieldDoneProcessCodes,
|
||||
FieldAction,
|
||||
FieldTargetDock,
|
||||
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 (
|
||||
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
||||
SnValidator 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
|
||||
// DefaultAction holds the default value on creation for the "action" field.
|
||||
DefaultAction string
|
||||
// ActionValidator is a validator for the "action" field. It is called by the builders before save.
|
||||
ActionValidator func(string) error
|
||||
// DefaultTargetDock holds the default value on creation for the "targetDock" field.
|
||||
DefaultTargetDock string
|
||||
// TargetDockValidator is a validator for the "targetDock" field. It is called by the builders before save.
|
||||
TargetDockValidator 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 SemiFlow 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()
|
||||
}
|
||||
|
||||
// BySn orders the results by the sn field.
|
||||
func BySn(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSn, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the orderNo field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAction orders the results by the action field.
|
||||
func ByAction(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAction, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTargetDock orders the results by the targetDock field.
|
||||
func ByTargetDock(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTargetDock, 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()
|
||||
}
|
||||
Reference in New Issue
Block a user