Files
bj_power/bj_power_wms/ent/ordermaterialledger/ordermaterialledger.go
T
SunYF a2afd2f6dc feat: 五项目业务实现并对接完成
- MES(B): 工单/BOM/备料/工序字典/PLC下发/拧紧/扫码报工/半成品/AGV/追溯逻辑,WMS与海康RCS客户端,看板Redis缓存API(概览/设备/进度/报警/趋势)+SSE
- WMS(C): JWT滑动续签、Excel导入、盘点、内部API、种子数据、独立Postgres配置
- WMS客户端(E): Go网关8891反向代理+内嵌Vue3十页
- 工位终端(D): SQLite本地缓存+模拟拧紧源+内嵌Vue3页面
- Dashboard(A): 看板数据改接MES内部缓存API,SSE实时刷新+vite代理
- 清理各项目球形磨遗留代码,新增部署手册.md
2026-08-27 19:50:57 +08:00

125 lines
4.2 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"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// 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,
FieldStatus,
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
// 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()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, 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()
}