新增扫码中间件支持网络型扫码枪键盘注入,AGV 对接从 WMS 迁至 MES 统一管理;新增拧紧不合格人工处置与 PLC 对账机制,优化退库单关联与工位终端功能,同时清理旧 AGV 任务表,完善数据库与配置项。
171 lines
6.3 KiB
Go
171 lines
6.3 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package workpiece
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the workpiece type in the database.
|
|
Label = "workpiece"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldSn holds the string denoting the sn field in the database.
|
|
FieldSn = "sn"
|
|
// FieldOrderNo holds the string denoting the orderno field in the database.
|
|
FieldOrderNo = "order_no"
|
|
// FieldWorkOrderId holds the string denoting the workorderid field in the database.
|
|
FieldWorkOrderId = "work_order_id"
|
|
// FieldCurrentStationNo holds the string denoting the currentstationno field in the database.
|
|
FieldCurrentStationNo = "current_station_no"
|
|
// FieldAtStationNo holds the string denoting the atstationno field in the database.
|
|
FieldAtStationNo = "at_station_no"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldOnlineAt holds the string denoting the onlineat field in the database.
|
|
FieldOnlineAt = "online_at"
|
|
// FieldDoneAt holds the string denoting the doneat field in the database.
|
|
FieldDoneAt = "done_at"
|
|
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldUpdatedAt holds the string denoting the updatedat field in the database.
|
|
FieldUpdatedAt = "updated_at"
|
|
// FieldTorqueNgPending holds the string denoting the torque_ng_pending field in the database.
|
|
FieldTorqueNgPending = "torque_ng_pending"
|
|
// FieldTorqueNgAt holds the string denoting the torque_ng_at field in the database.
|
|
FieldTorqueNgAt = "torque_ng_at"
|
|
// FieldTorqueNgBy holds the string denoting the torque_ng_by field in the database.
|
|
FieldTorqueNgBy = "torque_ng_by"
|
|
// Table holds the table name of the workpiece in the database.
|
|
Table = "workpiece"
|
|
)
|
|
|
|
// Columns holds all SQL columns for workpiece fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldSn,
|
|
FieldOrderNo,
|
|
FieldWorkOrderId,
|
|
FieldCurrentStationNo,
|
|
FieldAtStationNo,
|
|
FieldStatus,
|
|
FieldOnlineAt,
|
|
FieldDoneAt,
|
|
FieldCreatedAt,
|
|
FieldUpdatedAt,
|
|
FieldTorqueNgPending,
|
|
FieldTorqueNgAt,
|
|
FieldTorqueNgBy,
|
|
}
|
|
|
|
// 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 (
|
|
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
|
SnValidator func(string) error
|
|
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
|
|
DefaultOrderNo string
|
|
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
|
OrderNoValidator func(string) error
|
|
// DefaultStatus holds the default value on creation for the "status" field.
|
|
DefaultStatus string
|
|
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
|
StatusValidator func(string) error
|
|
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
|
|
DefaultCreatedAt func() time.Time
|
|
// DefaultUpdatedAt holds the default value on creation for the "updatedAt" field.
|
|
DefaultUpdatedAt func() time.Time
|
|
// UpdateDefaultUpdatedAt holds the default value on update for the "updatedAt" field.
|
|
UpdateDefaultUpdatedAt func() time.Time
|
|
// DefaultTorqueNgPending holds the default value on creation for the "torque_ng_pending" field.
|
|
DefaultTorqueNgPending bool
|
|
// TorqueNgByValidator is a validator for the "torque_ng_by" field. It is called by the builders before save.
|
|
TorqueNgByValidator func(string) error
|
|
// IDValidator is a validator for the "id" field. It is called by the builders before save.
|
|
IDValidator func(int) error
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the Workpiece 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()
|
|
}
|
|
|
|
// BySn orders the results by the sn field.
|
|
func BySn(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSn, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOrderNo orders the results by the orderNo field.
|
|
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByWorkOrderId orders the results by the workOrderId field.
|
|
func ByWorkOrderId(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldWorkOrderId, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCurrentStationNo orders the results by the currentStationNo field.
|
|
func ByCurrentStationNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCurrentStationNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByAtStationNo orders the results by the atStationNo field.
|
|
func ByAtStationNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldAtStationNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOnlineAt orders the results by the onlineAt field.
|
|
func ByOnlineAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOnlineAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByDoneAt orders the results by the doneAt field.
|
|
func ByDoneAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDoneAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the createdAt field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUpdatedAt orders the results by the updatedAt field.
|
|
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTorqueNgPending orders the results by the torque_ng_pending field.
|
|
func ByTorqueNgPending(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTorqueNgPending, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTorqueNgAt orders the results by the torque_ng_at field.
|
|
func ByTorqueNgAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTorqueNgAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTorqueNgBy orders the results by the torque_ng_by field.
|
|
func ByTorqueNgBy(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTorqueNgBy, opts...).ToFunc()
|
|
}
|