初始化2
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package bomitem
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the bomitem type in the database.
|
||||
Label = "bom_item"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldWorkOrderNo holds the string denoting the workorderno field in the database.
|
||||
FieldWorkOrderNo = "work_order_no"
|
||||
// FieldMaterialCode holds the string denoting the materialcode field in the database.
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldMaterialName holds the string denoting the materialname field in the database.
|
||||
FieldMaterialName = "material_name"
|
||||
// FieldSpec holds the string denoting the spec field in the database.
|
||||
FieldSpec = "spec"
|
||||
// FieldUnit holds the string denoting the unit field in the database.
|
||||
FieldUnit = "unit"
|
||||
// FieldManageMode holds the string denoting the managemode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldUnitQty holds the string denoting the unitqty field in the database.
|
||||
FieldUnitQty = "unit_qty"
|
||||
// FieldLossRate holds the string denoting the lossrate field in the database.
|
||||
FieldLossRate = "loss_rate"
|
||||
// FieldRequiredQty holds the string denoting the requiredqty field in the database.
|
||||
FieldRequiredQty = "required_qty"
|
||||
// FieldSerialSns holds the string denoting the serialsns field in the database.
|
||||
FieldSerialSns = "serial_sns"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// Table holds the table name of the bomitem in the database.
|
||||
Table = "work_order_bom"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for bomitem fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldWorkOrderNo,
|
||||
FieldMaterialCode,
|
||||
FieldMaterialName,
|
||||
FieldSpec,
|
||||
FieldUnit,
|
||||
FieldManageMode,
|
||||
FieldUnitQty,
|
||||
FieldLossRate,
|
||||
FieldRequiredQty,
|
||||
FieldSerialSns,
|
||||
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 (
|
||||
// WorkOrderNoValidator is a validator for the "workOrderNo" field. It is called by the builders before save.
|
||||
WorkOrderNoValidator func(string) error
|
||||
// MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save.
|
||||
MaterialCodeValidator func(string) error
|
||||
// DefaultMaterialName holds the default value on creation for the "materialName" field.
|
||||
DefaultMaterialName string
|
||||
// MaterialNameValidator is a validator for the "materialName" field. It is called by the builders before save.
|
||||
MaterialNameValidator func(string) error
|
||||
// DefaultSpec holds the default value on creation for the "spec" field.
|
||||
DefaultSpec string
|
||||
// SpecValidator is a validator for the "spec" field. It is called by the builders before save.
|
||||
SpecValidator func(string) error
|
||||
// DefaultUnit holds the default value on creation for the "unit" field.
|
||||
DefaultUnit string
|
||||
// UnitValidator is a validator for the "unit" field. It is called by the builders before save.
|
||||
UnitValidator func(string) error
|
||||
// DefaultManageMode holds the default value on creation for the "manageMode" field.
|
||||
DefaultManageMode string
|
||||
// ManageModeValidator is a validator for the "manageMode" field. It is called by the builders before save.
|
||||
ManageModeValidator func(string) error
|
||||
// DefaultUnitQty holds the default value on creation for the "unitQty" field.
|
||||
DefaultUnitQty float64
|
||||
// DefaultLossRate holds the default value on creation for the "lossRate" field.
|
||||
DefaultLossRate float64
|
||||
// DefaultRequiredQty holds the default value on creation for the "requiredQty" field.
|
||||
DefaultRequiredQty float64
|
||||
// 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 BomItem 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()
|
||||
}
|
||||
|
||||
// ByWorkOrderNo orders the results by the workOrderNo field.
|
||||
func ByWorkOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWorkOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the materialCode field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialName orders the results by the materialName field.
|
||||
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySpec orders the results by the spec field.
|
||||
func BySpec(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSpec, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUnit orders the results by the unit field.
|
||||
func ByUnit(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUnit, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByManageMode orders the results by the manageMode field.
|
||||
func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUnitQty orders the results by the unitQty field.
|
||||
func ByUnitQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUnitQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLossRate orders the results by the lossRate field.
|
||||
func ByLossRate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLossRate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRequiredQty orders the results by the requiredQty field.
|
||||
func ByRequiredQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRequiredQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the createdAt field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,680 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package bomitem
|
||||
|
||||
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.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// WorkOrderNo applies equality check predicate on the "workOrderNo" field. It's identical to WorkOrderNoEQ.
|
||||
func WorkOrderNo(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// MaterialCode applies equality check predicate on the "materialCode" field. It's identical to MaterialCodeEQ.
|
||||
func MaterialCode(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialName applies equality check predicate on the "materialName" field. It's identical to MaterialNameEQ.
|
||||
func MaterialName(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// Spec applies equality check predicate on the "spec" field. It's identical to SpecEQ.
|
||||
func Spec(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldSpec, v))
|
||||
}
|
||||
|
||||
// Unit applies equality check predicate on the "unit" field. It's identical to UnitEQ.
|
||||
func Unit(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldUnit, v))
|
||||
}
|
||||
|
||||
// ManageMode applies equality check predicate on the "manageMode" field. It's identical to ManageModeEQ.
|
||||
func ManageMode(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// UnitQty applies equality check predicate on the "unitQty" field. It's identical to UnitQtyEQ.
|
||||
func UnitQty(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// LossRate applies equality check predicate on the "lossRate" field. It's identical to LossRateEQ.
|
||||
func LossRate(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// RequiredQty applies equality check predicate on the "requiredQty" field. It's identical to RequiredQtyEQ.
|
||||
func RequiredQty(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoEQ applies the EQ predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoNEQ applies the NEQ predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoNEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoIn applies the In predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldWorkOrderNo, vs...))
|
||||
}
|
||||
|
||||
// WorkOrderNoNotIn applies the NotIn predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoNotIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldWorkOrderNo, vs...))
|
||||
}
|
||||
|
||||
// WorkOrderNoGT applies the GT predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoGT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoGTE applies the GTE predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoGTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoLT applies the LT predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoLT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoLTE applies the LTE predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoLTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoContains applies the Contains predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoContains(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContains(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoHasPrefix applies the HasPrefix predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoHasPrefix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasPrefix(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoHasSuffix applies the HasSuffix predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoHasSuffix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasSuffix(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoEqualFold applies the EqualFold predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoEqualFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEqualFold(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderNoContainsFold applies the ContainsFold predicate on the "workOrderNo" field.
|
||||
func WorkOrderNoContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldWorkOrderNo, v))
|
||||
}
|
||||
|
||||
// MaterialCodeEQ applies the EQ predicate on the "materialCode" field.
|
||||
func MaterialCodeEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeNEQ applies the NEQ predicate on the "materialCode" field.
|
||||
func MaterialCodeNEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeIn applies the In predicate on the "materialCode" field.
|
||||
func MaterialCodeIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldMaterialCode, vs...))
|
||||
}
|
||||
|
||||
// MaterialCodeNotIn applies the NotIn predicate on the "materialCode" field.
|
||||
func MaterialCodeNotIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldMaterialCode, vs...))
|
||||
}
|
||||
|
||||
// MaterialCodeGT applies the GT predicate on the "materialCode" field.
|
||||
func MaterialCodeGT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeGTE applies the GTE predicate on the "materialCode" field.
|
||||
func MaterialCodeGTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeLT applies the LT predicate on the "materialCode" field.
|
||||
func MaterialCodeLT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeLTE applies the LTE predicate on the "materialCode" field.
|
||||
func MaterialCodeLTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeContains applies the Contains predicate on the "materialCode" field.
|
||||
func MaterialCodeContains(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContains(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeHasPrefix applies the HasPrefix predicate on the "materialCode" field.
|
||||
func MaterialCodeHasPrefix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasPrefix(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeHasSuffix applies the HasSuffix predicate on the "materialCode" field.
|
||||
func MaterialCodeHasSuffix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasSuffix(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeEqualFold applies the EqualFold predicate on the "materialCode" field.
|
||||
func MaterialCodeEqualFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEqualFold(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialCodeContainsFold applies the ContainsFold predicate on the "materialCode" field.
|
||||
func MaterialCodeContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldMaterialCode, v))
|
||||
}
|
||||
|
||||
// MaterialNameEQ applies the EQ predicate on the "materialName" field.
|
||||
func MaterialNameEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameNEQ applies the NEQ predicate on the "materialName" field.
|
||||
func MaterialNameNEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameIn applies the In predicate on the "materialName" field.
|
||||
func MaterialNameIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldMaterialName, vs...))
|
||||
}
|
||||
|
||||
// MaterialNameNotIn applies the NotIn predicate on the "materialName" field.
|
||||
func MaterialNameNotIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldMaterialName, vs...))
|
||||
}
|
||||
|
||||
// MaterialNameGT applies the GT predicate on the "materialName" field.
|
||||
func MaterialNameGT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameGTE applies the GTE predicate on the "materialName" field.
|
||||
func MaterialNameGTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameLT applies the LT predicate on the "materialName" field.
|
||||
func MaterialNameLT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameLTE applies the LTE predicate on the "materialName" field.
|
||||
func MaterialNameLTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameContains applies the Contains predicate on the "materialName" field.
|
||||
func MaterialNameContains(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContains(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameHasPrefix applies the HasPrefix predicate on the "materialName" field.
|
||||
func MaterialNameHasPrefix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasPrefix(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameHasSuffix applies the HasSuffix predicate on the "materialName" field.
|
||||
func MaterialNameHasSuffix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasSuffix(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameEqualFold applies the EqualFold predicate on the "materialName" field.
|
||||
func MaterialNameEqualFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEqualFold(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// MaterialNameContainsFold applies the ContainsFold predicate on the "materialName" field.
|
||||
func MaterialNameContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldMaterialName, v))
|
||||
}
|
||||
|
||||
// SpecEQ applies the EQ predicate on the "spec" field.
|
||||
func SpecEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecNEQ applies the NEQ predicate on the "spec" field.
|
||||
func SpecNEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecIn applies the In predicate on the "spec" field.
|
||||
func SpecIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldSpec, vs...))
|
||||
}
|
||||
|
||||
// SpecNotIn applies the NotIn predicate on the "spec" field.
|
||||
func SpecNotIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldSpec, vs...))
|
||||
}
|
||||
|
||||
// SpecGT applies the GT predicate on the "spec" field.
|
||||
func SpecGT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecGTE applies the GTE predicate on the "spec" field.
|
||||
func SpecGTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecLT applies the LT predicate on the "spec" field.
|
||||
func SpecLT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecLTE applies the LTE predicate on the "spec" field.
|
||||
func SpecLTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecContains applies the Contains predicate on the "spec" field.
|
||||
func SpecContains(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContains(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecHasPrefix applies the HasPrefix predicate on the "spec" field.
|
||||
func SpecHasPrefix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasPrefix(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecHasSuffix applies the HasSuffix predicate on the "spec" field.
|
||||
func SpecHasSuffix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasSuffix(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecEqualFold applies the EqualFold predicate on the "spec" field.
|
||||
func SpecEqualFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEqualFold(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecContainsFold applies the ContainsFold predicate on the "spec" field.
|
||||
func SpecContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldSpec, v))
|
||||
}
|
||||
|
||||
// UnitEQ applies the EQ predicate on the "unit" field.
|
||||
func UnitEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitNEQ applies the NEQ predicate on the "unit" field.
|
||||
func UnitNEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitIn applies the In predicate on the "unit" field.
|
||||
func UnitIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldUnit, vs...))
|
||||
}
|
||||
|
||||
// UnitNotIn applies the NotIn predicate on the "unit" field.
|
||||
func UnitNotIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldUnit, vs...))
|
||||
}
|
||||
|
||||
// UnitGT applies the GT predicate on the "unit" field.
|
||||
func UnitGT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitGTE applies the GTE predicate on the "unit" field.
|
||||
func UnitGTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitLT applies the LT predicate on the "unit" field.
|
||||
func UnitLT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitLTE applies the LTE predicate on the "unit" field.
|
||||
func UnitLTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitContains applies the Contains predicate on the "unit" field.
|
||||
func UnitContains(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContains(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitHasPrefix applies the HasPrefix predicate on the "unit" field.
|
||||
func UnitHasPrefix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasPrefix(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitHasSuffix applies the HasSuffix predicate on the "unit" field.
|
||||
func UnitHasSuffix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasSuffix(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitEqualFold applies the EqualFold predicate on the "unit" field.
|
||||
func UnitEqualFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEqualFold(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitContainsFold applies the ContainsFold predicate on the "unit" field.
|
||||
func UnitContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldUnit, v))
|
||||
}
|
||||
|
||||
// ManageModeEQ applies the EQ predicate on the "manageMode" field.
|
||||
func ManageModeEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeNEQ applies the NEQ predicate on the "manageMode" field.
|
||||
func ManageModeNEQ(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeIn applies the In predicate on the "manageMode" field.
|
||||
func ManageModeIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldManageMode, vs...))
|
||||
}
|
||||
|
||||
// ManageModeNotIn applies the NotIn predicate on the "manageMode" field.
|
||||
func ManageModeNotIn(vs ...string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldManageMode, vs...))
|
||||
}
|
||||
|
||||
// ManageModeGT applies the GT predicate on the "manageMode" field.
|
||||
func ManageModeGT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeGTE applies the GTE predicate on the "manageMode" field.
|
||||
func ManageModeGTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeLT applies the LT predicate on the "manageMode" field.
|
||||
func ManageModeLT(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeLTE applies the LTE predicate on the "manageMode" field.
|
||||
func ManageModeLTE(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeContains applies the Contains predicate on the "manageMode" field.
|
||||
func ManageModeContains(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContains(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeHasPrefix applies the HasPrefix predicate on the "manageMode" field.
|
||||
func ManageModeHasPrefix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasPrefix(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeHasSuffix applies the HasSuffix predicate on the "manageMode" field.
|
||||
func ManageModeHasSuffix(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldHasSuffix(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeEqualFold applies the EqualFold predicate on the "manageMode" field.
|
||||
func ManageModeEqualFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEqualFold(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeContainsFold applies the ContainsFold predicate on the "manageMode" field.
|
||||
func ManageModeContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// UnitQtyEQ applies the EQ predicate on the "unitQty" field.
|
||||
func UnitQtyEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// UnitQtyNEQ applies the NEQ predicate on the "unitQty" field.
|
||||
func UnitQtyNEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// UnitQtyIn applies the In predicate on the "unitQty" field.
|
||||
func UnitQtyIn(vs ...float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldUnitQty, vs...))
|
||||
}
|
||||
|
||||
// UnitQtyNotIn applies the NotIn predicate on the "unitQty" field.
|
||||
func UnitQtyNotIn(vs ...float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldUnitQty, vs...))
|
||||
}
|
||||
|
||||
// UnitQtyGT applies the GT predicate on the "unitQty" field.
|
||||
func UnitQtyGT(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// UnitQtyGTE applies the GTE predicate on the "unitQty" field.
|
||||
func UnitQtyGTE(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// UnitQtyLT applies the LT predicate on the "unitQty" field.
|
||||
func UnitQtyLT(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// UnitQtyLTE applies the LTE predicate on the "unitQty" field.
|
||||
func UnitQtyLTE(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldUnitQty, v))
|
||||
}
|
||||
|
||||
// LossRateEQ applies the EQ predicate on the "lossRate" field.
|
||||
func LossRateEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// LossRateNEQ applies the NEQ predicate on the "lossRate" field.
|
||||
func LossRateNEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// LossRateIn applies the In predicate on the "lossRate" field.
|
||||
func LossRateIn(vs ...float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldLossRate, vs...))
|
||||
}
|
||||
|
||||
// LossRateNotIn applies the NotIn predicate on the "lossRate" field.
|
||||
func LossRateNotIn(vs ...float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldLossRate, vs...))
|
||||
}
|
||||
|
||||
// LossRateGT applies the GT predicate on the "lossRate" field.
|
||||
func LossRateGT(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// LossRateGTE applies the GTE predicate on the "lossRate" field.
|
||||
func LossRateGTE(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// LossRateLT applies the LT predicate on the "lossRate" field.
|
||||
func LossRateLT(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// LossRateLTE applies the LTE predicate on the "lossRate" field.
|
||||
func LossRateLTE(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldLossRate, v))
|
||||
}
|
||||
|
||||
// RequiredQtyEQ applies the EQ predicate on the "requiredQty" field.
|
||||
func RequiredQtyEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// RequiredQtyNEQ applies the NEQ predicate on the "requiredQty" field.
|
||||
func RequiredQtyNEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// RequiredQtyIn applies the In predicate on the "requiredQty" field.
|
||||
func RequiredQtyIn(vs ...float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldRequiredQty, vs...))
|
||||
}
|
||||
|
||||
// RequiredQtyNotIn applies the NotIn predicate on the "requiredQty" field.
|
||||
func RequiredQtyNotIn(vs ...float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldRequiredQty, vs...))
|
||||
}
|
||||
|
||||
// RequiredQtyGT applies the GT predicate on the "requiredQty" field.
|
||||
func RequiredQtyGT(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// RequiredQtyGTE applies the GTE predicate on the "requiredQty" field.
|
||||
func RequiredQtyGTE(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// RequiredQtyLT applies the LT predicate on the "requiredQty" field.
|
||||
func RequiredQtyLT(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// RequiredQtyLTE applies the LTE predicate on the "requiredQty" field.
|
||||
func RequiredQtyLTE(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldRequiredQty, v))
|
||||
}
|
||||
|
||||
// SerialSnsIsNil applies the IsNil predicate on the "serialSns" field.
|
||||
func SerialSnsIsNil() predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIsNull(FieldSerialSns))
|
||||
}
|
||||
|
||||
// SerialSnsNotNil applies the NotNil predicate on the "serialSns" field.
|
||||
func SerialSnsNotNil() predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotNull(FieldSerialSns))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "createdAt" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "createdAt" field.
|
||||
func CreatedAtGT(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "createdAt" field.
|
||||
func CreatedAtLT(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.BomItem) predicate.BomItem {
|
||||
return predicate.BomItem(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.BomItem) predicate.BomItem {
|
||||
return predicate.BomItem(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.BomItem) predicate.BomItem {
|
||||
return predicate.BomItem(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user