Files
bj_power/bj_power_mes/ent/productprocess/productprocess.go
T
SunYF b032f47fc7 feat: 新增产品工艺管理与工序审核功能
- 新增产品工艺(product_process)及明细(product_process_item)数据模型
- 新增工序审核开关(need_audit)与审核角色(audit_role)字段
- 新增待审核签字页面与路由
- 优化 WMS/MES 接口交互,增加业务错误处理与友好提示
- 补充库存过滤逻辑,避免返回已出库 SN 数据
- 调整默认查询时间范围为近一个月,优化用户体验
2026-10-09 13:46:33 +08:00

123 lines
4.4 KiB
Go

// Code generated by ent, DO NOT EDIT.
package productprocess
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the productprocess type in the database.
Label = "product_process"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldProductCode holds the string denoting the productcode field in the database.
FieldProductCode = "product_code"
// FieldProductName holds the string denoting the productname field in the database.
FieldProductName = "product_name"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldIsDefault holds the string denoting the isdefault field in the database.
FieldIsDefault = "is_default"
// 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 createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the productprocess in the database.
Table = "product_process"
)
// Columns holds all SQL columns for productprocess fields.
var Columns = []string{
FieldID,
FieldProductCode,
FieldProductName,
FieldName,
FieldIsDefault,
FieldStatus,
FieldRemark,
FieldCreatedAt,
}
// 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 (
// ProductCodeValidator is a validator for the "productCode" field. It is called by the builders before save.
ProductCodeValidator func(string) error
// DefaultProductName holds the default value on creation for the "productName" field.
DefaultProductName string
// ProductNameValidator is a validator for the "productName" field. It is called by the builders before save.
ProductNameValidator func(string) error
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultIsDefault holds the default value on creation for the "isDefault" field.
DefaultIsDefault bool
// 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
// DefaultRemark holds the default value on creation for the "remark" field.
DefaultRemark string
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
RemarkValidator func(string) error
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt func() time.Time
// 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 ProductProcess 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()
}
// ByProductCode orders the results by the productCode field.
func ByProductCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductCode, opts...).ToFunc()
}
// ByProductName orders the results by the productName field.
func ByProductName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductName, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByIsDefault orders the results by the isDefault field.
func ByIsDefault(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsDefault, 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 createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}