Files
bj_power/bj_power_wms/ent/ordermaterialledger/ordermaterialledger.go
T
SunYF 05b0b8a909 feat: 完成客户第12条需求+多系统改造
1. 新增预警表添加工单号字段,支持按工单号检索预警
2. 添加工单过滤在制品/绩效报表/预警中心查询
3. 补全WMS台账字段口径与权限配置
4. 修复备料单与数量不符处理流程
5. 新增配送进度/库位联动/自动出库功能
6. 修复AGV配送状态更新逻辑
7. 优化退料与库存管理细节
2026-09-19 17:04:58 +08:00

161 lines
5.7 KiB
Go

// Code generated by ent, DO NOT EDIT.
package ordermaterialledger
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the ordermaterialledger type in the database.
Label = "order_material_ledger"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldOrderNo holds the string denoting the order_no field in the database.
FieldOrderNo = "order_no"
// FieldMaterialCode holds the string denoting the material_code field in the database.
FieldMaterialCode = "material_code"
// FieldMaterialName holds the string denoting the material_name field in the database.
FieldMaterialName = "material_name"
// FieldTotalQty holds the string denoting the total_qty field in the database.
FieldTotalQty = "total_qty"
// FieldOutQty holds the string denoting the out_qty field in the database.
FieldOutQty = "out_qty"
// FieldReturnedQty holds the string denoting the returned_qty field in the database.
FieldReturnedQty = "returned_qty"
// FieldConsumedQty holds the string denoting the consumed_qty field in the database.
FieldConsumedQty = "consumed_qty"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldTargetStation holds the string denoting the target_station field in the database.
FieldTargetStation = "target_station"
// FieldCompletedAt holds the string denoting the completed_at field in the database.
FieldCompletedAt = "completed_at"
// 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 ordermaterialledger in the database.
Table = "order_material_ledgers"
)
// Columns holds all SQL columns for ordermaterialledger fields.
var Columns = []string{
FieldID,
FieldOrderNo,
FieldMaterialCode,
FieldMaterialName,
FieldTotalQty,
FieldOutQty,
FieldReturnedQty,
FieldConsumedQty,
FieldStatus,
FieldTargetStation,
FieldCompletedAt,
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 (
// DefaultTotalQty holds the default value on creation for the "total_qty" field.
DefaultTotalQty int
// DefaultOutQty holds the default value on creation for the "out_qty" field.
DefaultOutQty int
// DefaultReturnedQty holds the default value on creation for the "returned_qty" field.
DefaultReturnedQty int
// DefaultConsumedQty holds the default value on creation for the "consumed_qty" field.
DefaultConsumedQty int
// 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 OrderMaterialLedger 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()
}
// ByOrderNo orders the results by the order_no field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// ByMaterialCode orders the results by the material_code field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByMaterialName orders the results by the material_name field.
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
}
// ByTotalQty orders the results by the total_qty field.
func ByTotalQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTotalQty, opts...).ToFunc()
}
// ByOutQty orders the results by the out_qty field.
func ByOutQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOutQty, opts...).ToFunc()
}
// ByReturnedQty orders the results by the returned_qty field.
func ByReturnedQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReturnedQty, opts...).ToFunc()
}
// ByConsumedQty orders the results by the consumed_qty field.
func ByConsumedQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldConsumedQty, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
}
// ByTargetStation orders the results by the target_station field.
func ByTargetStation(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTargetStation, opts...).ToFunc()
}
// ByCompletedAt orders the results by the completed_at field.
func ByCompletedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCompletedAt, 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()
}