- 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
97 lines
3.1 KiB
Go
97 lines
3.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package stocktakeorder
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the stocktakeorder type in the database.
|
|
Label = "stocktake_order"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldStocktakeNo holds the string denoting the stocktake_no field in the database.
|
|
FieldStocktakeNo = "stocktake_no"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldOperator holds the string denoting the operator field in the database.
|
|
FieldOperator = "operator"
|
|
// FieldTotalTargets holds the string denoting the total_targets field in the database.
|
|
FieldTotalTargets = "total_targets"
|
|
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldFinishedAt holds the string denoting the finished_at field in the database.
|
|
FieldFinishedAt = "finished_at"
|
|
// Table holds the table name of the stocktakeorder in the database.
|
|
Table = "stocktake_orders"
|
|
)
|
|
|
|
// Columns holds all SQL columns for stocktakeorder fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldStocktakeNo,
|
|
FieldStatus,
|
|
FieldOperator,
|
|
FieldTotalTargets,
|
|
FieldCreatedAt,
|
|
FieldFinishedAt,
|
|
}
|
|
|
|
// 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
|
|
// DefaultTotalTargets holds the default value on creation for the "total_targets" field.
|
|
DefaultTotalTargets int
|
|
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
|
DefaultCreatedAt func() int64
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the StocktakeOrder 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()
|
|
}
|
|
|
|
// ByStocktakeNo orders the results by the stocktake_no field.
|
|
func ByStocktakeNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStocktakeNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOperator orders the results by the operator field.
|
|
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTotalTargets orders the results by the total_targets field.
|
|
func ByTotalTargets(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTotalTargets, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByFinishedAt orders the results by the finished_at field.
|
|
func ByFinishedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldFinishedAt, opts...).ToFunc()
|
|
}
|