feat: 新增检测单关联、基础数据优化与入库单升级
1. 新增出库单检测单号字段并添加索引支持溯源 2. 优化基础数据页面物料类型展示与选择逻辑 3. 升级入库单导入功能,支持自动生成单号并返回导入结果 4. 优化接驳台查询排序方式 5. 修复字符串拼接空格问题
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package material
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the material type in the database.
|
||||
Label = "material"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldCode holds the string denoting the code field in the database.
|
||||
FieldCode = "code"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "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"
|
||||
// FieldDescription holds the string denoting the description field in the database.
|
||||
FieldDescription = "description"
|
||||
// FieldItemType holds the string denoting the item_type field in the database.
|
||||
FieldItemType = "item_type"
|
||||
// FieldManageMode holds the string denoting the manage_mode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldIsBatchManaged holds the string denoting the is_batch_managed field in the database.
|
||||
FieldIsBatchManaged = "is_batch_managed"
|
||||
// FieldIsSerialManaged holds the string denoting the is_serial_managed field in the database.
|
||||
FieldIsSerialManaged = "is_serial_managed"
|
||||
// FieldTemplateCode holds the string denoting the template_code field in the database.
|
||||
FieldTemplateCode = "template_code"
|
||||
// FieldSafetyStock holds the string denoting the safety_stock field in the database.
|
||||
FieldSafetyStock = "safety_stock"
|
||||
// FieldIsActive holds the string denoting the is_active field in the database.
|
||||
FieldIsActive = "is_active"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// Table holds the table name of the material in the database.
|
||||
Table = "materials"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for material fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCode,
|
||||
FieldName,
|
||||
FieldSpec,
|
||||
FieldUnit,
|
||||
FieldDescription,
|
||||
FieldItemType,
|
||||
FieldManageMode,
|
||||
FieldIsBatchManaged,
|
||||
FieldIsSerialManaged,
|
||||
FieldTemplateCode,
|
||||
FieldSafetyStock,
|
||||
FieldIsActive,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultItemType holds the default value on creation for the "item_type" field.
|
||||
DefaultItemType int
|
||||
// DefaultManageMode holds the default value on creation for the "manage_mode" field.
|
||||
DefaultManageMode int
|
||||
// DefaultIsBatchManaged holds the default value on creation for the "is_batch_managed" field.
|
||||
DefaultIsBatchManaged bool
|
||||
// DefaultIsSerialManaged holds the default value on creation for the "is_serial_managed" field.
|
||||
DefaultIsSerialManaged bool
|
||||
// DefaultSafetyStock holds the default value on creation for the "safety_stock" field.
|
||||
DefaultSafetyStock int
|
||||
// DefaultIsActive holds the default value on creation for the "is_active" field.
|
||||
DefaultIsActive bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Material 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()
|
||||
}
|
||||
|
||||
// ByCode orders the results by the code field.
|
||||
func ByCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, 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()
|
||||
}
|
||||
|
||||
// ByDescription orders the results by the description field.
|
||||
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDescription, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByItemType orders the results by the item_type field.
|
||||
func ByItemType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldItemType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByManageMode orders the results by the manage_mode field.
|
||||
func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsBatchManaged orders the results by the is_batch_managed field.
|
||||
func ByIsBatchManaged(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsBatchManaged, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsSerialManaged orders the results by the is_serial_managed field.
|
||||
func ByIsSerialManaged(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsSerialManaged, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTemplateCode orders the results by the template_code field.
|
||||
func ByTemplateCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTemplateCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySafetyStock orders the results by the safety_stock field.
|
||||
func BySafetyStock(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSafetyStock, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsActive orders the results by the is_active field.
|
||||
func ByIsActive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsActive, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,799 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package material
|
||||
|
||||
import (
|
||||
"bj_power_wms/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// Code applies equality check predicate on the "code" field. It's identical to CodeEQ.
|
||||
func Code(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCode, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// Spec applies equality check predicate on the "spec" field. It's identical to SpecEQ.
|
||||
func Spec(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSpec, v))
|
||||
}
|
||||
|
||||
// Unit applies equality check predicate on the "unit" field. It's identical to UnitEQ.
|
||||
func Unit(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldUnit, v))
|
||||
}
|
||||
|
||||
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
|
||||
func Description(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// ItemType applies equality check predicate on the "item_type" field. It's identical to ItemTypeEQ.
|
||||
func ItemType(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ManageMode applies equality check predicate on the "manage_mode" field. It's identical to ManageModeEQ.
|
||||
func ManageMode(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// IsBatchManaged applies equality check predicate on the "is_batch_managed" field. It's identical to IsBatchManagedEQ.
|
||||
func IsBatchManaged(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsBatchManaged, v))
|
||||
}
|
||||
|
||||
// IsSerialManaged applies equality check predicate on the "is_serial_managed" field. It's identical to IsSerialManagedEQ.
|
||||
func IsSerialManaged(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsSerialManaged, v))
|
||||
}
|
||||
|
||||
// TemplateCode applies equality check predicate on the "template_code" field. It's identical to TemplateCodeEQ.
|
||||
func TemplateCode(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// SafetyStock applies equality check predicate on the "safety_stock" field. It's identical to SafetyStockEQ.
|
||||
func SafetyStock(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// IsActive applies equality check predicate on the "is_active" field. It's identical to IsActiveEQ.
|
||||
func IsActive(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// CodeEQ applies the EQ predicate on the "code" field.
|
||||
func CodeEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeNEQ applies the NEQ predicate on the "code" field.
|
||||
func CodeNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeIn applies the In predicate on the "code" field.
|
||||
func CodeIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldCode, vs...))
|
||||
}
|
||||
|
||||
// CodeNotIn applies the NotIn predicate on the "code" field.
|
||||
func CodeNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldCode, vs...))
|
||||
}
|
||||
|
||||
// CodeGT applies the GT predicate on the "code" field.
|
||||
func CodeGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeGTE applies the GTE predicate on the "code" field.
|
||||
func CodeGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeLT applies the LT predicate on the "code" field.
|
||||
func CodeLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeLTE applies the LTE predicate on the "code" field.
|
||||
func CodeLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeContains applies the Contains predicate on the "code" field.
|
||||
func CodeContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeHasPrefix applies the HasPrefix predicate on the "code" field.
|
||||
func CodeHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeHasSuffix applies the HasSuffix predicate on the "code" field.
|
||||
func CodeHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeEqualFold applies the EqualFold predicate on the "code" field.
|
||||
func CodeEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldCode, v))
|
||||
}
|
||||
|
||||
// CodeContainsFold applies the ContainsFold predicate on the "code" field.
|
||||
func CodeContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldCode, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// SpecEQ applies the EQ predicate on the "spec" field.
|
||||
func SpecEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecNEQ applies the NEQ predicate on the "spec" field.
|
||||
func SpecNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecIn applies the In predicate on the "spec" field.
|
||||
func SpecIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldSpec, vs...))
|
||||
}
|
||||
|
||||
// SpecNotIn applies the NotIn predicate on the "spec" field.
|
||||
func SpecNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldSpec, vs...))
|
||||
}
|
||||
|
||||
// SpecGT applies the GT predicate on the "spec" field.
|
||||
func SpecGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecGTE applies the GTE predicate on the "spec" field.
|
||||
func SpecGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecLT applies the LT predicate on the "spec" field.
|
||||
func SpecLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecLTE applies the LTE predicate on the "spec" field.
|
||||
func SpecLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecContains applies the Contains predicate on the "spec" field.
|
||||
func SpecContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecHasPrefix applies the HasPrefix predicate on the "spec" field.
|
||||
func SpecHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecHasSuffix applies the HasSuffix predicate on the "spec" field.
|
||||
func SpecHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecIsNil applies the IsNil predicate on the "spec" field.
|
||||
func SpecIsNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldIsNull(FieldSpec))
|
||||
}
|
||||
|
||||
// SpecNotNil applies the NotNil predicate on the "spec" field.
|
||||
func SpecNotNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldNotNull(FieldSpec))
|
||||
}
|
||||
|
||||
// SpecEqualFold applies the EqualFold predicate on the "spec" field.
|
||||
func SpecEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldSpec, v))
|
||||
}
|
||||
|
||||
// SpecContainsFold applies the ContainsFold predicate on the "spec" field.
|
||||
func SpecContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldSpec, v))
|
||||
}
|
||||
|
||||
// UnitEQ applies the EQ predicate on the "unit" field.
|
||||
func UnitEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitNEQ applies the NEQ predicate on the "unit" field.
|
||||
func UnitNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitIn applies the In predicate on the "unit" field.
|
||||
func UnitIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldUnit, vs...))
|
||||
}
|
||||
|
||||
// UnitNotIn applies the NotIn predicate on the "unit" field.
|
||||
func UnitNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldUnit, vs...))
|
||||
}
|
||||
|
||||
// UnitGT applies the GT predicate on the "unit" field.
|
||||
func UnitGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitGTE applies the GTE predicate on the "unit" field.
|
||||
func UnitGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitLT applies the LT predicate on the "unit" field.
|
||||
func UnitLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitLTE applies the LTE predicate on the "unit" field.
|
||||
func UnitLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitContains applies the Contains predicate on the "unit" field.
|
||||
func UnitContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitHasPrefix applies the HasPrefix predicate on the "unit" field.
|
||||
func UnitHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitHasSuffix applies the HasSuffix predicate on the "unit" field.
|
||||
func UnitHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitIsNil applies the IsNil predicate on the "unit" field.
|
||||
func UnitIsNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldIsNull(FieldUnit))
|
||||
}
|
||||
|
||||
// UnitNotNil applies the NotNil predicate on the "unit" field.
|
||||
func UnitNotNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldNotNull(FieldUnit))
|
||||
}
|
||||
|
||||
// UnitEqualFold applies the EqualFold predicate on the "unit" field.
|
||||
func UnitEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldUnit, v))
|
||||
}
|
||||
|
||||
// UnitContainsFold applies the ContainsFold predicate on the "unit" field.
|
||||
func UnitContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldUnit, v))
|
||||
}
|
||||
|
||||
// DescriptionEQ applies the EQ predicate on the "description" field.
|
||||
func DescriptionEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionNEQ applies the NEQ predicate on the "description" field.
|
||||
func DescriptionNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionIn applies the In predicate on the "description" field.
|
||||
func DescriptionIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldDescription, vs...))
|
||||
}
|
||||
|
||||
// DescriptionNotIn applies the NotIn predicate on the "description" field.
|
||||
func DescriptionNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldDescription, vs...))
|
||||
}
|
||||
|
||||
// DescriptionGT applies the GT predicate on the "description" field.
|
||||
func DescriptionGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionGTE applies the GTE predicate on the "description" field.
|
||||
func DescriptionGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionLT applies the LT predicate on the "description" field.
|
||||
func DescriptionLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionLTE applies the LTE predicate on the "description" field.
|
||||
func DescriptionLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionContains applies the Contains predicate on the "description" field.
|
||||
func DescriptionContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
|
||||
func DescriptionHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
|
||||
func DescriptionHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionIsNil applies the IsNil predicate on the "description" field.
|
||||
func DescriptionIsNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldIsNull(FieldDescription))
|
||||
}
|
||||
|
||||
// DescriptionNotNil applies the NotNil predicate on the "description" field.
|
||||
func DescriptionNotNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldNotNull(FieldDescription))
|
||||
}
|
||||
|
||||
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
|
||||
func DescriptionEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldDescription, v))
|
||||
}
|
||||
|
||||
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
|
||||
func DescriptionContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldDescription, v))
|
||||
}
|
||||
|
||||
// ItemTypeEQ applies the EQ predicate on the "item_type" field.
|
||||
func ItemTypeEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeNEQ applies the NEQ predicate on the "item_type" field.
|
||||
func ItemTypeNEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeIn applies the In predicate on the "item_type" field.
|
||||
func ItemTypeIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldItemType, vs...))
|
||||
}
|
||||
|
||||
// ItemTypeNotIn applies the NotIn predicate on the "item_type" field.
|
||||
func ItemTypeNotIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldItemType, vs...))
|
||||
}
|
||||
|
||||
// ItemTypeGT applies the GT predicate on the "item_type" field.
|
||||
func ItemTypeGT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeGTE applies the GTE predicate on the "item_type" field.
|
||||
func ItemTypeGTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeLT applies the LT predicate on the "item_type" field.
|
||||
func ItemTypeLT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeLTE applies the LTE predicate on the "item_type" field.
|
||||
func ItemTypeLTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ManageModeEQ applies the EQ predicate on the "manage_mode" field.
|
||||
func ManageModeEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeNEQ applies the NEQ predicate on the "manage_mode" field.
|
||||
func ManageModeNEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeIn applies the In predicate on the "manage_mode" field.
|
||||
func ManageModeIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldManageMode, vs...))
|
||||
}
|
||||
|
||||
// ManageModeNotIn applies the NotIn predicate on the "manage_mode" field.
|
||||
func ManageModeNotIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldManageMode, vs...))
|
||||
}
|
||||
|
||||
// ManageModeGT applies the GT predicate on the "manage_mode" field.
|
||||
func ManageModeGT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeGTE applies the GTE predicate on the "manage_mode" field.
|
||||
func ManageModeGTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeLT applies the LT predicate on the "manage_mode" field.
|
||||
func ManageModeLT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ManageModeLTE applies the LTE predicate on the "manage_mode" field.
|
||||
func ManageModeLTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// IsBatchManagedEQ applies the EQ predicate on the "is_batch_managed" field.
|
||||
func IsBatchManagedEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsBatchManaged, v))
|
||||
}
|
||||
|
||||
// IsBatchManagedNEQ applies the NEQ predicate on the "is_batch_managed" field.
|
||||
func IsBatchManagedNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldIsBatchManaged, v))
|
||||
}
|
||||
|
||||
// IsSerialManagedEQ applies the EQ predicate on the "is_serial_managed" field.
|
||||
func IsSerialManagedEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsSerialManaged, v))
|
||||
}
|
||||
|
||||
// IsSerialManagedNEQ applies the NEQ predicate on the "is_serial_managed" field.
|
||||
func IsSerialManagedNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldIsSerialManaged, v))
|
||||
}
|
||||
|
||||
// TemplateCodeEQ applies the EQ predicate on the "template_code" field.
|
||||
func TemplateCodeEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeNEQ applies the NEQ predicate on the "template_code" field.
|
||||
func TemplateCodeNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeIn applies the In predicate on the "template_code" field.
|
||||
func TemplateCodeIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldTemplateCode, vs...))
|
||||
}
|
||||
|
||||
// TemplateCodeNotIn applies the NotIn predicate on the "template_code" field.
|
||||
func TemplateCodeNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldTemplateCode, vs...))
|
||||
}
|
||||
|
||||
// TemplateCodeGT applies the GT predicate on the "template_code" field.
|
||||
func TemplateCodeGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeGTE applies the GTE predicate on the "template_code" field.
|
||||
func TemplateCodeGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeLT applies the LT predicate on the "template_code" field.
|
||||
func TemplateCodeLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeLTE applies the LTE predicate on the "template_code" field.
|
||||
func TemplateCodeLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeContains applies the Contains predicate on the "template_code" field.
|
||||
func TemplateCodeContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeHasPrefix applies the HasPrefix predicate on the "template_code" field.
|
||||
func TemplateCodeHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeHasSuffix applies the HasSuffix predicate on the "template_code" field.
|
||||
func TemplateCodeHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeIsNil applies the IsNil predicate on the "template_code" field.
|
||||
func TemplateCodeIsNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldIsNull(FieldTemplateCode))
|
||||
}
|
||||
|
||||
// TemplateCodeNotNil applies the NotNil predicate on the "template_code" field.
|
||||
func TemplateCodeNotNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldNotNull(FieldTemplateCode))
|
||||
}
|
||||
|
||||
// TemplateCodeEqualFold applies the EqualFold predicate on the "template_code" field.
|
||||
func TemplateCodeEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// TemplateCodeContainsFold applies the ContainsFold predicate on the "template_code" field.
|
||||
func TemplateCodeContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// SafetyStockEQ applies the EQ predicate on the "safety_stock" field.
|
||||
func SafetyStockEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockNEQ applies the NEQ predicate on the "safety_stock" field.
|
||||
func SafetyStockNEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockIn applies the In predicate on the "safety_stock" field.
|
||||
func SafetyStockIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldSafetyStock, vs...))
|
||||
}
|
||||
|
||||
// SafetyStockNotIn applies the NotIn predicate on the "safety_stock" field.
|
||||
func SafetyStockNotIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldSafetyStock, vs...))
|
||||
}
|
||||
|
||||
// SafetyStockGT applies the GT predicate on the "safety_stock" field.
|
||||
func SafetyStockGT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockGTE applies the GTE predicate on the "safety_stock" field.
|
||||
func SafetyStockGTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockLT applies the LT predicate on the "safety_stock" field.
|
||||
func SafetyStockLT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockLTE applies the LTE predicate on the "safety_stock" field.
|
||||
func SafetyStockLTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// IsActiveEQ applies the EQ predicate on the "is_active" field.
|
||||
func IsActiveEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// IsActiveNEQ applies the NEQ predicate on the "is_active" field.
|
||||
func IsActiveNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Material) predicate.Material {
|
||||
return predicate.Material(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Material) predicate.Material {
|
||||
return predicate.Material(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Material) predicate.Material {
|
||||
return predicate.Material(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user