feat: 完成区域管理、装箱功能优化与接口标准化
- 新增区域状态字段与增删改查接口,支持区域启用/停用 - 重构实体字段JSON标签为camelCase格式统一接口规范 - 优化入库、盘点、装箱流程的交互与提示文案 - 新增装箱管理功能,支持合同号关联与装箱编辑 - 调整前端菜单与帮助文档适配业务场景变更
This commit is contained in:
@@ -21,10 +21,14 @@ const (
|
||||
FieldQuantity = "quantity"
|
||||
// FieldOperator holds the string denoting the operator field in the database.
|
||||
FieldOperator = "operator"
|
||||
// FieldContractNo holds the string denoting the contract_no field in the database.
|
||||
FieldContractNo = "contract_no"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// 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 packagebox in the database.
|
||||
Table = "package_boxes"
|
||||
)
|
||||
@@ -37,8 +41,10 @@ var Columns = []string{
|
||||
FieldMaterialCode,
|
||||
FieldQuantity,
|
||||
FieldOperator,
|
||||
FieldContractNo,
|
||||
FieldRemark,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
@@ -56,6 +62,8 @@ var (
|
||||
DefaultQuantity int
|
||||
// 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 PackageBox queries.
|
||||
@@ -91,6 +99,11 @@ func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByContractNo orders the results by the contract_no field.
|
||||
func ByContractNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldContractNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRemark orders the results by the remark field.
|
||||
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
||||
@@ -100,3 +113,8 @@ func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
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()
|
||||
}
|
||||
|
||||
@@ -78,6 +78,11 @@ func Operator(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldOperator, v))
|
||||
}
|
||||
|
||||
// ContractNo applies equality check predicate on the "contract_no" field. It's identical to ContractNoEQ.
|
||||
func ContractNo(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.
|
||||
func Remark(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldRemark, v))
|
||||
@@ -88,6 +93,11 @@ func CreatedAt(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// BoxNoEQ applies the EQ predicate on the "box_no" field.
|
||||
func BoxNoEQ(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldBoxNo, v))
|
||||
@@ -418,6 +428,81 @@ func OperatorContainsFold(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldContainsFold(FieldOperator, v))
|
||||
}
|
||||
|
||||
// ContractNoEQ applies the EQ predicate on the "contract_no" field.
|
||||
func ContractNoEQ(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoNEQ applies the NEQ predicate on the "contract_no" field.
|
||||
func ContractNoNEQ(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldNEQ(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoIn applies the In predicate on the "contract_no" field.
|
||||
func ContractNoIn(vs ...string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldIn(FieldContractNo, vs...))
|
||||
}
|
||||
|
||||
// ContractNoNotIn applies the NotIn predicate on the "contract_no" field.
|
||||
func ContractNoNotIn(vs ...string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldNotIn(FieldContractNo, vs...))
|
||||
}
|
||||
|
||||
// ContractNoGT applies the GT predicate on the "contract_no" field.
|
||||
func ContractNoGT(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldGT(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoGTE applies the GTE predicate on the "contract_no" field.
|
||||
func ContractNoGTE(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldGTE(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoLT applies the LT predicate on the "contract_no" field.
|
||||
func ContractNoLT(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldLT(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoLTE applies the LTE predicate on the "contract_no" field.
|
||||
func ContractNoLTE(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldLTE(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoContains applies the Contains predicate on the "contract_no" field.
|
||||
func ContractNoContains(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldContains(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoHasPrefix applies the HasPrefix predicate on the "contract_no" field.
|
||||
func ContractNoHasPrefix(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldHasPrefix(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoHasSuffix applies the HasSuffix predicate on the "contract_no" field.
|
||||
func ContractNoHasSuffix(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldHasSuffix(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoIsNil applies the IsNil predicate on the "contract_no" field.
|
||||
func ContractNoIsNil() predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldIsNull(FieldContractNo))
|
||||
}
|
||||
|
||||
// ContractNoNotNil applies the NotNil predicate on the "contract_no" field.
|
||||
func ContractNoNotNil() predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldNotNull(FieldContractNo))
|
||||
}
|
||||
|
||||
// ContractNoEqualFold applies the EqualFold predicate on the "contract_no" field.
|
||||
func ContractNoEqualFold(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEqualFold(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// ContractNoContainsFold applies the ContainsFold predicate on the "contract_no" field.
|
||||
func ContractNoContainsFold(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldContainsFold(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// RemarkEQ applies the EQ predicate on the "remark" field.
|
||||
func RemarkEQ(v string) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldRemark, v))
|
||||
@@ -533,6 +618,56 @@ func CreatedAtLTE(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v int64) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
|
||||
func UpdatedAtIsNil() predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldIsNull(FieldUpdatedAt))
|
||||
}
|
||||
|
||||
// UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.
|
||||
func UpdatedAtNotNil() predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.FieldNotNull(FieldUpdatedAt))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.PackageBox) predicate.PackageBox {
|
||||
return predicate.PackageBox(sql.AndPredicates(predicates...))
|
||||
|
||||
Reference in New Issue
Block a user