Files
bj_power/bj_power_wms/ent/inventorybatch/inventorybatch.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

149 lines
5.2 KiB
Go

// Code generated by ent, DO NOT EDIT.
package inventorybatch
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the inventorybatch type in the database.
Label = "inventory_batch"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldBatchNo holds the string denoting the batch_no field in the database.
FieldBatchNo = "batch_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"
// FieldQuantity holds the string denoting the quantity field in the database.
FieldQuantity = "quantity"
// FieldLockedQty holds the string denoting the locked_qty field in the database.
FieldLockedQty = "locked_qty"
// FieldProductionDate holds the string denoting the production_date field in the database.
FieldProductionDate = "production_date"
// FieldSupplier holds the string denoting the supplier field in the database.
FieldSupplier = "supplier"
// FieldQualityStatus holds the string denoting the quality_status field in the database.
FieldQualityStatus = "quality_status"
// FieldZoneCode holds the string denoting the zone_code field in the database.
FieldZoneCode = "zone_code"
// 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 inventorybatch in the database.
Table = "inventory_batches"
)
// Columns holds all SQL columns for inventorybatch fields.
var Columns = []string{
FieldID,
FieldBatchNo,
FieldMaterialCode,
FieldMaterialName,
FieldQuantity,
FieldLockedQty,
FieldProductionDate,
FieldSupplier,
FieldQualityStatus,
FieldZoneCode,
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
// DefaultLockedQty holds the default value on creation for the "locked_qty" field.
DefaultLockedQty int
// DefaultQualityStatus holds the default value on creation for the "quality_status" field.
DefaultQualityStatus 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 InventoryBatch 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()
}
// ByBatchNo orders the results by the batch_no field.
func ByBatchNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBatchNo, 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()
}
// ByQuantity orders the results by the quantity field.
func ByQuantity(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldQuantity, opts...).ToFunc()
}
// ByLockedQty orders the results by the locked_qty field.
func ByLockedQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLockedQty, opts...).ToFunc()
}
// ByProductionDate orders the results by the production_date field.
func ByProductionDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductionDate, opts...).ToFunc()
}
// BySupplier orders the results by the supplier field.
func BySupplier(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSupplier, opts...).ToFunc()
}
// ByQualityStatus orders the results by the quality_status field.
func ByQualityStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldQualityStatus, opts...).ToFunc()
}
// ByZoneCode orders the results by the zone_code field.
func ByZoneCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldZoneCode, 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()
}