Files
bj_power/bj_power_mes/ent/materialqtyreport/materialqtyreport.go
T
SunYF 4a5e2d7bac feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能
- 增加工单工程编号三级归属字段
- 新增物料安全库存与缺货预警
- 新增附件管理、退库单管理模块
- 优化生产看板展示逻辑与前端页面文案
- 清理冗余的工艺路线相关代码与备份文件
2026-09-15 16:37:39 +08:00

189 lines
7.1 KiB
Go

// Code generated by ent, DO NOT EDIT.
package materialqtyreport
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the materialqtyreport type in the database.
Label = "material_qty_report"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldStationNo holds the string denoting the stationno field in the database.
FieldStationNo = "station_no"
// FieldOrderNo holds the string denoting the orderno field in the database.
FieldOrderNo = "order_no"
// FieldSn holds the string denoting the sn field in the database.
FieldSn = "sn"
// FieldMaterialCode holds the string denoting the materialcode field in the database.
FieldMaterialCode = "material_code"
// FieldMaterialName holds the string denoting the materialname field in the database.
FieldMaterialName = "material_name"
// FieldPlanQty holds the string denoting the planqty field in the database.
FieldPlanQty = "plan_qty"
// FieldActualQty holds the string denoting the actualqty field in the database.
FieldActualQty = "actual_qty"
// FieldDiffQty holds the string denoting the diffqty field in the database.
FieldDiffQty = "diff_qty"
// FieldCause holds the string denoting the cause field in the database.
FieldCause = "cause"
// 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"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// FieldResolvedAt holds the string denoting the resolvedat field in the database.
FieldResolvedAt = "resolved_at"
// Table holds the table name of the materialqtyreport in the database.
Table = "material_qty_report"
)
// Columns holds all SQL columns for materialqtyreport fields.
var Columns = []string{
FieldID,
FieldStationNo,
FieldOrderNo,
FieldSn,
FieldMaterialCode,
FieldMaterialName,
FieldPlanQty,
FieldActualQty,
FieldDiffQty,
FieldCause,
FieldStatus,
FieldOperator,
FieldCreatedAt,
FieldResolvedAt,
}
// 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 (
// DefaultStationNo holds the default value on creation for the "stationNo" field.
DefaultStationNo int
// 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
// DefaultSn holds the default value on creation for the "sn" field.
DefaultSn string
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
SnValidator func(string) error
// DefaultMaterialCode holds the default value on creation for the "materialCode" field.
DefaultMaterialCode string
// MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save.
MaterialCodeValidator func(string) error
// DefaultMaterialName holds the default value on creation for the "materialName" field.
DefaultMaterialName string
// MaterialNameValidator is a validator for the "materialName" field. It is called by the builders before save.
MaterialNameValidator func(string) error
// DefaultPlanQty holds the default value on creation for the "planQty" field.
DefaultPlanQty int
// DefaultActualQty holds the default value on creation for the "actualQty" field.
DefaultActualQty int
// DefaultDiffQty holds the default value on creation for the "diffQty" field.
DefaultDiffQty int
// DefaultCause holds the default value on creation for the "cause" field.
DefaultCause string
// CauseValidator is a validator for the "cause" field. It is called by the builders before save.
CauseValidator 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
// DefaultOperator holds the default value on creation for the "operator" field.
DefaultOperator string
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
OperatorValidator 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 MaterialQtyReport 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()
}
// ByStationNo orders the results by the stationNo field.
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
}
// ByOrderNo orders the results by the orderNo field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// BySn orders the results by the sn field.
func BySn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSn, opts...).ToFunc()
}
// ByMaterialCode orders the results by the materialCode field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByMaterialName orders the results by the materialName field.
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
}
// ByPlanQty orders the results by the planQty field.
func ByPlanQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPlanQty, opts...).ToFunc()
}
// ByActualQty orders the results by the actualQty field.
func ByActualQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldActualQty, opts...).ToFunc()
}
// ByDiffQty orders the results by the diffQty field.
func ByDiffQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDiffQty, opts...).ToFunc()
}
// ByCause orders the results by the cause field.
func ByCause(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCause, 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()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByResolvedAt orders the results by the resolvedAt field.
func ByResolvedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldResolvedAt, opts...).ToFunc()
}