本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
113 lines
4.0 KiB
Go
113 lines
4.0 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"
|
|
// 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,
|
|
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
|
|
// 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()
|
|
}
|
|
|
|
// 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()
|
|
}
|