1. 新增跨平台磁盘空间监控能力,每日7点自动检测附件目录剩余空间,触发阈值告警 2. 重构附件存储方案为年/月/日/文件类型分层结构,统一MES与WMS的附件管理逻辑 3. 对齐物料档案与入库单的质量状态校验规则,仅合格品计入库存与出库 4. 实现入库单作废功能与区域库位的多级父子结构管理 5. 删除物料简称字段,补充规格型号与单位必填项,统一系统数据口径 6. 新增附件中心与磁盘状态查询接口,完善权限控制与操作日志
153 lines
5.0 KiB
Go
153 lines
5.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"
|
|
// FieldLevel holds the string denoting the level field in the database.
|
|
FieldLevel = "level"
|
|
// 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"
|
|
// FieldParentCode holds the string denoting the parent_code field in the database.
|
|
FieldParentCode = "parent_code"
|
|
// 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"
|
|
// FieldShelfNo holds the string denoting the shelf_no field in the database.
|
|
FieldShelfNo = "shelf_no"
|
|
// FieldLayerNo holds the string denoting the layer_no field in the database.
|
|
FieldLayerNo = "layer_no"
|
|
// FieldPositionNo holds the string denoting the position_no field in the database.
|
|
FieldPositionNo = "position_no"
|
|
// 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,
|
|
FieldLevel,
|
|
FieldCode,
|
|
FieldName,
|
|
FieldParentCode,
|
|
FieldZoneCode,
|
|
FieldZoneName,
|
|
FieldDescription,
|
|
FieldShelfNo,
|
|
FieldLayerNo,
|
|
FieldPositionNo,
|
|
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()
|
|
}
|
|
|
|
// ByLevel orders the results by the level field.
|
|
func ByLevel(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldLevel, 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()
|
|
}
|
|
|
|
// ByParentCode orders the results by the parent_code field.
|
|
func ByParentCode(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldParentCode, 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()
|
|
}
|
|
|
|
// ByShelfNo orders the results by the shelf_no field.
|
|
func ByShelfNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldShelfNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByLayerNo orders the results by the layer_no field.
|
|
func ByLayerNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldLayerNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByPositionNo orders the results by the position_no field.
|
|
func ByPositionNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPositionNo, 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()
|
|
}
|