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

97 lines
3.0 KiB
Go

// Code generated by ent, DO NOT EDIT.
package zone
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the zone type in the database.
Label = "zone"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldZoneCode holds the string denoting the zone_code field in the database.
FieldZoneCode = "zone_code"
// FieldZoneName holds the string denoting the zone_name field in the database.
FieldZoneName = "zone_name"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// 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 zone in the database.
Table = "zones"
)
// Columns holds all SQL columns for zone fields.
var Columns = []string{
FieldID,
FieldZoneCode,
FieldZoneName,
FieldDescription,
FieldStatus,
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 (
// DefaultStatus holds the default value on creation for the "status" field.
DefaultStatus string
// 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 Zone 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()
}
// ByZoneCode orders the results by the zone_code field.
func ByZoneCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldZoneCode, opts...).ToFunc()
}
// ByZoneName orders the results by the zone_name field.
func ByZoneName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldZoneName, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, 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()
}