Files
bj_power/bj_power_mes/ent/stepdata/stepdata.go
T

171 lines
6.3 KiB
Go
Raw Normal View History

2026-08-28 15:06:01 +08:00
// Code generated by ent, DO NOT EDIT.
package stepdata
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the stepdata type in the database.
Label = "step_data"
// 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"
// FieldProcessId holds the string denoting the processid field in the database.
FieldProcessId = "process_id"
// FieldStepId holds the string denoting the stepid field in the database.
FieldStepId = "step_id"
// FieldStepName holds the string denoting the stepname field in the database.
FieldStepName = "step_name"
// FieldCriterionId holds the string denoting the criterionid field in the database.
FieldCriterionId = "criterion_id"
// FieldCriterionName holds the string denoting the criterionname field in the database.
FieldCriterionName = "criterion_name"
// FieldCriterionLogic holds the string denoting the criterionlogic field in the database.
FieldCriterionLogic = "criterion_logic"
// FieldValue holds the string denoting the value field in the database.
FieldValue = "value"
// FieldValueText holds the string denoting the valuetext field in the database.
FieldValueText = "value_text"
// FieldIsOK holds the string denoting the isok field in the database.
FieldIsOK = "is_ok"
// 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"
// Table holds the table name of the stepdata in the database.
Table = "step_data"
)
// Columns holds all SQL columns for stepdata fields.
var Columns = []string{
FieldID,
FieldSn,
FieldProcessId,
FieldStepId,
FieldStepName,
FieldCriterionId,
FieldCriterionName,
FieldCriterionLogic,
FieldValue,
FieldValueText,
FieldIsOK,
FieldOperator,
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 (
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
SnValidator func(string) error
// DefaultStepName holds the default value on creation for the "stepName" field.
DefaultStepName string
// StepNameValidator is a validator for the "stepName" field. It is called by the builders before save.
StepNameValidator func(string) error
// DefaultCriterionName holds the default value on creation for the "criterionName" field.
DefaultCriterionName string
// CriterionNameValidator is a validator for the "criterionName" field. It is called by the builders before save.
CriterionNameValidator func(string) error
// DefaultCriterionLogic holds the default value on creation for the "criterionLogic" field.
DefaultCriterionLogic string
// CriterionLogicValidator is a validator for the "criterionLogic" field. It is called by the builders before save.
CriterionLogicValidator func(string) error
// DefaultValue holds the default value on creation for the "value" field.
DefaultValue float64
// DefaultValueText holds the default value on creation for the "valueText" field.
DefaultValueText string
// ValueTextValidator is a validator for the "valueText" field. It is called by the builders before save.
ValueTextValidator func(string) error
// DefaultIsOK holds the default value on creation for the "isOK" field.
DefaultIsOK bool
// 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 StepData 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()
}
// ByProcessId orders the results by the processId field.
func ByProcessId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProcessId, opts...).ToFunc()
}
// ByStepId orders the results by the stepId field.
func ByStepId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStepId, opts...).ToFunc()
}
// ByStepName orders the results by the stepName field.
func ByStepName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStepName, opts...).ToFunc()
}
// ByCriterionId orders the results by the criterionId field.
func ByCriterionId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCriterionId, opts...).ToFunc()
}
// ByCriterionName orders the results by the criterionName field.
func ByCriterionName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCriterionName, opts...).ToFunc()
}
// ByCriterionLogic orders the results by the criterionLogic field.
func ByCriterionLogic(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCriterionLogic, opts...).ToFunc()
}
// ByValue orders the results by the value field.
func ByValue(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldValue, opts...).ToFunc()
}
// ByValueText orders the results by the valueText field.
func ByValueText(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldValueText, opts...).ToFunc()
}
// ByIsOK orders the results by the isOK field.
func ByIsOK(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIsOK, 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()
}