Files
bj_power/bj_power_wms/ent/packagebox/packagebox.go
T
SunYF bb22148625 feat: 完成区域管理、装箱功能优化与接口标准化
- 新增区域状态字段与增删改查接口,支持区域启用/停用
- 重构实体字段JSON标签为camelCase格式统一接口规范
- 优化入库、盘点、装箱流程的交互与提示文案
- 新增装箱管理功能,支持合同号关联与装箱编辑
- 调整前端菜单与帮助文档适配业务场景变更
2026-09-01 13:49:44 +08:00

121 lines
3.9 KiB
Go

// Code generated by ent, DO NOT EDIT.
package packagebox
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the packagebox type in the database.
Label = "package_box"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldBoxNo holds the string denoting the box_no field in the database.
FieldBoxNo = "box_no"
// FieldSnList holds the string denoting the sn_list field in the database.
FieldSnList = "sn_list"
// FieldMaterialCode holds the string denoting the material_code field in the database.
FieldMaterialCode = "material_code"
// FieldQuantity holds the string denoting the quantity field in the database.
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"
)
// Columns holds all SQL columns for packagebox fields.
var Columns = []string{
FieldID,
FieldBoxNo,
FieldSnList,
FieldMaterialCode,
FieldQuantity,
FieldOperator,
FieldContractNo,
FieldRemark,
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 (
// DefaultQuantity holds the default value on creation for the "quantity" field.
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.
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()
}
// ByBoxNo orders the results by the box_no field.
func ByBoxNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBoxNo, opts...).ToFunc()
}
// BySnList orders the results by the sn_list field.
func BySnList(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSnList, opts...).ToFunc()
}
// ByMaterialCode orders the results by the material_code field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByQuantity orders the results by the quantity field.
func ByQuantity(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldQuantity, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
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()
}
// 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()
}