初始化2

This commit is contained in:
SunYF
2026-08-28 15:06:01 +08:00
parent b34325a16f
commit a9c3fbeb41
537 changed files with 176215 additions and 17 deletions
+117
View File
@@ -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()
}
+475
View File
@@ -0,0 +1,475 @@
// Code generated by ent, DO NOT EDIT.
package semiflow
import (
"bj_power_mes/ent/predicate"
"time"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldID, id))
}
// Sn applies equality check predicate on the "sn" field. It's identical to SnEQ.
func Sn(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldSn, v))
}
// OrderNo applies equality check predicate on the "orderNo" field. It's identical to OrderNoEQ.
func OrderNo(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldOrderNo, v))
}
// Action applies equality check predicate on the "action" field. It's identical to ActionEQ.
func Action(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldAction, v))
}
// TargetDock applies equality check predicate on the "targetDock" field. It's identical to TargetDockEQ.
func TargetDock(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldTargetDock, v))
}
// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ.
func Operator(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldOperator, v))
}
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldCreatedAt, v))
}
// SnEQ applies the EQ predicate on the "sn" field.
func SnEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldSn, v))
}
// SnNEQ applies the NEQ predicate on the "sn" field.
func SnNEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldSn, v))
}
// SnIn applies the In predicate on the "sn" field.
func SnIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldSn, vs...))
}
// SnNotIn applies the NotIn predicate on the "sn" field.
func SnNotIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldSn, vs...))
}
// SnGT applies the GT predicate on the "sn" field.
func SnGT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldSn, v))
}
// SnGTE applies the GTE predicate on the "sn" field.
func SnGTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldSn, v))
}
// SnLT applies the LT predicate on the "sn" field.
func SnLT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldSn, v))
}
// SnLTE applies the LTE predicate on the "sn" field.
func SnLTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldSn, v))
}
// SnContains applies the Contains predicate on the "sn" field.
func SnContains(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContains(FieldSn, v))
}
// SnHasPrefix applies the HasPrefix predicate on the "sn" field.
func SnHasPrefix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasPrefix(FieldSn, v))
}
// SnHasSuffix applies the HasSuffix predicate on the "sn" field.
func SnHasSuffix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasSuffix(FieldSn, v))
}
// SnEqualFold applies the EqualFold predicate on the "sn" field.
func SnEqualFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEqualFold(FieldSn, v))
}
// SnContainsFold applies the ContainsFold predicate on the "sn" field.
func SnContainsFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContainsFold(FieldSn, v))
}
// OrderNoEQ applies the EQ predicate on the "orderNo" field.
func OrderNoEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldOrderNo, v))
}
// OrderNoNEQ applies the NEQ predicate on the "orderNo" field.
func OrderNoNEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldOrderNo, v))
}
// OrderNoIn applies the In predicate on the "orderNo" field.
func OrderNoIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldOrderNo, vs...))
}
// OrderNoNotIn applies the NotIn predicate on the "orderNo" field.
func OrderNoNotIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldOrderNo, vs...))
}
// OrderNoGT applies the GT predicate on the "orderNo" field.
func OrderNoGT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldOrderNo, v))
}
// OrderNoGTE applies the GTE predicate on the "orderNo" field.
func OrderNoGTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldOrderNo, v))
}
// OrderNoLT applies the LT predicate on the "orderNo" field.
func OrderNoLT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldOrderNo, v))
}
// OrderNoLTE applies the LTE predicate on the "orderNo" field.
func OrderNoLTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldOrderNo, v))
}
// OrderNoContains applies the Contains predicate on the "orderNo" field.
func OrderNoContains(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContains(FieldOrderNo, v))
}
// OrderNoHasPrefix applies the HasPrefix predicate on the "orderNo" field.
func OrderNoHasPrefix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasPrefix(FieldOrderNo, v))
}
// OrderNoHasSuffix applies the HasSuffix predicate on the "orderNo" field.
func OrderNoHasSuffix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasSuffix(FieldOrderNo, v))
}
// OrderNoEqualFold applies the EqualFold predicate on the "orderNo" field.
func OrderNoEqualFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEqualFold(FieldOrderNo, v))
}
// OrderNoContainsFold applies the ContainsFold predicate on the "orderNo" field.
func OrderNoContainsFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContainsFold(FieldOrderNo, v))
}
// DoneProcessCodesIsNil applies the IsNil predicate on the "doneProcessCodes" field.
func DoneProcessCodesIsNil() predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIsNull(FieldDoneProcessCodes))
}
// DoneProcessCodesNotNil applies the NotNil predicate on the "doneProcessCodes" field.
func DoneProcessCodesNotNil() predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotNull(FieldDoneProcessCodes))
}
// ActionEQ applies the EQ predicate on the "action" field.
func ActionEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldAction, v))
}
// ActionNEQ applies the NEQ predicate on the "action" field.
func ActionNEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldAction, v))
}
// ActionIn applies the In predicate on the "action" field.
func ActionIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldAction, vs...))
}
// ActionNotIn applies the NotIn predicate on the "action" field.
func ActionNotIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldAction, vs...))
}
// ActionGT applies the GT predicate on the "action" field.
func ActionGT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldAction, v))
}
// ActionGTE applies the GTE predicate on the "action" field.
func ActionGTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldAction, v))
}
// ActionLT applies the LT predicate on the "action" field.
func ActionLT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldAction, v))
}
// ActionLTE applies the LTE predicate on the "action" field.
func ActionLTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldAction, v))
}
// ActionContains applies the Contains predicate on the "action" field.
func ActionContains(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContains(FieldAction, v))
}
// ActionHasPrefix applies the HasPrefix predicate on the "action" field.
func ActionHasPrefix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasPrefix(FieldAction, v))
}
// ActionHasSuffix applies the HasSuffix predicate on the "action" field.
func ActionHasSuffix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasSuffix(FieldAction, v))
}
// ActionEqualFold applies the EqualFold predicate on the "action" field.
func ActionEqualFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEqualFold(FieldAction, v))
}
// ActionContainsFold applies the ContainsFold predicate on the "action" field.
func ActionContainsFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContainsFold(FieldAction, v))
}
// TargetDockEQ applies the EQ predicate on the "targetDock" field.
func TargetDockEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldTargetDock, v))
}
// TargetDockNEQ applies the NEQ predicate on the "targetDock" field.
func TargetDockNEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldTargetDock, v))
}
// TargetDockIn applies the In predicate on the "targetDock" field.
func TargetDockIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldTargetDock, vs...))
}
// TargetDockNotIn applies the NotIn predicate on the "targetDock" field.
func TargetDockNotIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldTargetDock, vs...))
}
// TargetDockGT applies the GT predicate on the "targetDock" field.
func TargetDockGT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldTargetDock, v))
}
// TargetDockGTE applies the GTE predicate on the "targetDock" field.
func TargetDockGTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldTargetDock, v))
}
// TargetDockLT applies the LT predicate on the "targetDock" field.
func TargetDockLT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldTargetDock, v))
}
// TargetDockLTE applies the LTE predicate on the "targetDock" field.
func TargetDockLTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldTargetDock, v))
}
// TargetDockContains applies the Contains predicate on the "targetDock" field.
func TargetDockContains(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContains(FieldTargetDock, v))
}
// TargetDockHasPrefix applies the HasPrefix predicate on the "targetDock" field.
func TargetDockHasPrefix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasPrefix(FieldTargetDock, v))
}
// TargetDockHasSuffix applies the HasSuffix predicate on the "targetDock" field.
func TargetDockHasSuffix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasSuffix(FieldTargetDock, v))
}
// TargetDockEqualFold applies the EqualFold predicate on the "targetDock" field.
func TargetDockEqualFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEqualFold(FieldTargetDock, v))
}
// TargetDockContainsFold applies the ContainsFold predicate on the "targetDock" field.
func TargetDockContainsFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContainsFold(FieldTargetDock, v))
}
// OperatorEQ applies the EQ predicate on the "operator" field.
func OperatorEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldOperator, v))
}
// OperatorNEQ applies the NEQ predicate on the "operator" field.
func OperatorNEQ(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldOperator, v))
}
// OperatorIn applies the In predicate on the "operator" field.
func OperatorIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldOperator, vs...))
}
// OperatorNotIn applies the NotIn predicate on the "operator" field.
func OperatorNotIn(vs ...string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldOperator, vs...))
}
// OperatorGT applies the GT predicate on the "operator" field.
func OperatorGT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldOperator, v))
}
// OperatorGTE applies the GTE predicate on the "operator" field.
func OperatorGTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldOperator, v))
}
// OperatorLT applies the LT predicate on the "operator" field.
func OperatorLT(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldOperator, v))
}
// OperatorLTE applies the LTE predicate on the "operator" field.
func OperatorLTE(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldOperator, v))
}
// OperatorContains applies the Contains predicate on the "operator" field.
func OperatorContains(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContains(FieldOperator, v))
}
// OperatorHasPrefix applies the HasPrefix predicate on the "operator" field.
func OperatorHasPrefix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasPrefix(FieldOperator, v))
}
// OperatorHasSuffix applies the HasSuffix predicate on the "operator" field.
func OperatorHasSuffix(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldHasSuffix(FieldOperator, v))
}
// OperatorEqualFold applies the EqualFold predicate on the "operator" field.
func OperatorEqualFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEqualFold(FieldOperator, v))
}
// OperatorContainsFold applies the ContainsFold predicate on the "operator" field.
func OperatorContainsFold(v string) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldContainsFold(FieldOperator, v))
}
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtEQ(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
func CreatedAtNEQ(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "createdAt" field.
func CreatedAtIn(vs ...time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
func CreatedAtNotIn(vs ...time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "createdAt" field.
func CreatedAtGT(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
func CreatedAtGTE(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "createdAt" field.
func CreatedAtLT(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
func CreatedAtLTE(v time.Time) predicate.SemiFlow {
return predicate.SemiFlow(sql.FieldLTE(FieldCreatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.SemiFlow) predicate.SemiFlow {
return predicate.SemiFlow(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.SemiFlow) predicate.SemiFlow {
return predicate.SemiFlow(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.SemiFlow) predicate.SemiFlow {
return predicate.SemiFlow(sql.NotPredicates(p))
}