feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力

- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页)
- WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报
- AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典
- 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列
- 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等)
- 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
SunYF
2026-11-15 12:17:39 +08:00
parent 7e8066ab66
commit 1e92b2a596
221 changed files with 26421 additions and 2230 deletions
+124
View File
@@ -0,0 +1,124 @@
// Code generated by ent, DO NOT EDIT.
package trialrecord
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the trialrecord type in the database.
Label = "trial_record"
// 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"
// FieldMaterialCode holds the string denoting the materialcode field in the database.
FieldMaterialCode = "material_code"
// FieldOrderNo holds the string denoting the orderno field in the database.
FieldOrderNo = "order_no"
// FieldResult holds the string denoting the result field in the database.
FieldResult = "result"
// FieldReason holds the string denoting the reason field in the database.
FieldReason = "reason"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the trialrecord in the database.
Table = "trial_records"
)
// Columns holds all SQL columns for trialrecord fields.
var Columns = []string{
FieldID,
FieldSn,
FieldMaterialCode,
FieldOrderNo,
FieldResult,
FieldReason,
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
// 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
// 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
// ResultValidator is a validator for the "result" field. It is called by the builders before save.
ResultValidator func(string) error
// DefaultReason holds the default value on creation for the "reason" field.
DefaultReason string
// ReasonValidator is a validator for the "reason" field. It is called by the builders before save.
ReasonValidator 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 "created_at" 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 TrialRecord 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()
}
// ByMaterialCode orders the results by the materialCode field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByOrderNo orders the results by the orderNo field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// ByResult orders the results by the result field.
func ByResult(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldResult, opts...).ToFunc()
}
// ByReason orders the results by the reason field.
func ByReason(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReason, 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 created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
+535
View File
@@ -0,0 +1,535 @@
// Code generated by ent, DO NOT EDIT.
package trialrecord
import (
"bj_power_mes/ent/predicate"
"time"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldID, id))
}
// Sn applies equality check predicate on the "sn" field. It's identical to SnEQ.
func Sn(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldSn, v))
}
// MaterialCode applies equality check predicate on the "materialCode" field. It's identical to MaterialCodeEQ.
func MaterialCode(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldMaterialCode, v))
}
// OrderNo applies equality check predicate on the "orderNo" field. It's identical to OrderNoEQ.
func OrderNo(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldOrderNo, v))
}
// Result applies equality check predicate on the "result" field. It's identical to ResultEQ.
func Result(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldResult, v))
}
// Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.
func Reason(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldReason, v))
}
// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ.
func Operator(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldOperator, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldCreatedAt, v))
}
// SnEQ applies the EQ predicate on the "sn" field.
func SnEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldSn, v))
}
// SnNEQ applies the NEQ predicate on the "sn" field.
func SnNEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldSn, v))
}
// SnIn applies the In predicate on the "sn" field.
func SnIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldSn, vs...))
}
// SnNotIn applies the NotIn predicate on the "sn" field.
func SnNotIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldSn, vs...))
}
// SnGT applies the GT predicate on the "sn" field.
func SnGT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldSn, v))
}
// SnGTE applies the GTE predicate on the "sn" field.
func SnGTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldSn, v))
}
// SnLT applies the LT predicate on the "sn" field.
func SnLT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldSn, v))
}
// SnLTE applies the LTE predicate on the "sn" field.
func SnLTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldSn, v))
}
// SnContains applies the Contains predicate on the "sn" field.
func SnContains(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContains(FieldSn, v))
}
// SnHasPrefix applies the HasPrefix predicate on the "sn" field.
func SnHasPrefix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasPrefix(FieldSn, v))
}
// SnHasSuffix applies the HasSuffix predicate on the "sn" field.
func SnHasSuffix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasSuffix(FieldSn, v))
}
// SnEqualFold applies the EqualFold predicate on the "sn" field.
func SnEqualFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEqualFold(FieldSn, v))
}
// SnContainsFold applies the ContainsFold predicate on the "sn" field.
func SnContainsFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContainsFold(FieldSn, v))
}
// MaterialCodeEQ applies the EQ predicate on the "materialCode" field.
func MaterialCodeEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldMaterialCode, v))
}
// MaterialCodeNEQ applies the NEQ predicate on the "materialCode" field.
func MaterialCodeNEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldMaterialCode, v))
}
// MaterialCodeIn applies the In predicate on the "materialCode" field.
func MaterialCodeIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldMaterialCode, vs...))
}
// MaterialCodeNotIn applies the NotIn predicate on the "materialCode" field.
func MaterialCodeNotIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldMaterialCode, vs...))
}
// MaterialCodeGT applies the GT predicate on the "materialCode" field.
func MaterialCodeGT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldMaterialCode, v))
}
// MaterialCodeGTE applies the GTE predicate on the "materialCode" field.
func MaterialCodeGTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldMaterialCode, v))
}
// MaterialCodeLT applies the LT predicate on the "materialCode" field.
func MaterialCodeLT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldMaterialCode, v))
}
// MaterialCodeLTE applies the LTE predicate on the "materialCode" field.
func MaterialCodeLTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldMaterialCode, v))
}
// MaterialCodeContains applies the Contains predicate on the "materialCode" field.
func MaterialCodeContains(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContains(FieldMaterialCode, v))
}
// MaterialCodeHasPrefix applies the HasPrefix predicate on the "materialCode" field.
func MaterialCodeHasPrefix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasPrefix(FieldMaterialCode, v))
}
// MaterialCodeHasSuffix applies the HasSuffix predicate on the "materialCode" field.
func MaterialCodeHasSuffix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasSuffix(FieldMaterialCode, v))
}
// MaterialCodeEqualFold applies the EqualFold predicate on the "materialCode" field.
func MaterialCodeEqualFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEqualFold(FieldMaterialCode, v))
}
// MaterialCodeContainsFold applies the ContainsFold predicate on the "materialCode" field.
func MaterialCodeContainsFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContainsFold(FieldMaterialCode, v))
}
// OrderNoEQ applies the EQ predicate on the "orderNo" field.
func OrderNoEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldOrderNo, v))
}
// OrderNoNEQ applies the NEQ predicate on the "orderNo" field.
func OrderNoNEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldOrderNo, v))
}
// OrderNoIn applies the In predicate on the "orderNo" field.
func OrderNoIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldOrderNo, vs...))
}
// OrderNoNotIn applies the NotIn predicate on the "orderNo" field.
func OrderNoNotIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldOrderNo, vs...))
}
// OrderNoGT applies the GT predicate on the "orderNo" field.
func OrderNoGT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldOrderNo, v))
}
// OrderNoGTE applies the GTE predicate on the "orderNo" field.
func OrderNoGTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldOrderNo, v))
}
// OrderNoLT applies the LT predicate on the "orderNo" field.
func OrderNoLT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldOrderNo, v))
}
// OrderNoLTE applies the LTE predicate on the "orderNo" field.
func OrderNoLTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldOrderNo, v))
}
// OrderNoContains applies the Contains predicate on the "orderNo" field.
func OrderNoContains(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContains(FieldOrderNo, v))
}
// OrderNoHasPrefix applies the HasPrefix predicate on the "orderNo" field.
func OrderNoHasPrefix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasPrefix(FieldOrderNo, v))
}
// OrderNoHasSuffix applies the HasSuffix predicate on the "orderNo" field.
func OrderNoHasSuffix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasSuffix(FieldOrderNo, v))
}
// OrderNoEqualFold applies the EqualFold predicate on the "orderNo" field.
func OrderNoEqualFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEqualFold(FieldOrderNo, v))
}
// OrderNoContainsFold applies the ContainsFold predicate on the "orderNo" field.
func OrderNoContainsFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContainsFold(FieldOrderNo, v))
}
// ResultEQ applies the EQ predicate on the "result" field.
func ResultEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldResult, v))
}
// ResultNEQ applies the NEQ predicate on the "result" field.
func ResultNEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldResult, v))
}
// ResultIn applies the In predicate on the "result" field.
func ResultIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldResult, vs...))
}
// ResultNotIn applies the NotIn predicate on the "result" field.
func ResultNotIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldResult, vs...))
}
// ResultGT applies the GT predicate on the "result" field.
func ResultGT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldResult, v))
}
// ResultGTE applies the GTE predicate on the "result" field.
func ResultGTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldResult, v))
}
// ResultLT applies the LT predicate on the "result" field.
func ResultLT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldResult, v))
}
// ResultLTE applies the LTE predicate on the "result" field.
func ResultLTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldResult, v))
}
// ResultContains applies the Contains predicate on the "result" field.
func ResultContains(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContains(FieldResult, v))
}
// ResultHasPrefix applies the HasPrefix predicate on the "result" field.
func ResultHasPrefix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasPrefix(FieldResult, v))
}
// ResultHasSuffix applies the HasSuffix predicate on the "result" field.
func ResultHasSuffix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasSuffix(FieldResult, v))
}
// ResultEqualFold applies the EqualFold predicate on the "result" field.
func ResultEqualFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEqualFold(FieldResult, v))
}
// ResultContainsFold applies the ContainsFold predicate on the "result" field.
func ResultContainsFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContainsFold(FieldResult, v))
}
// ReasonEQ applies the EQ predicate on the "reason" field.
func ReasonEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldReason, v))
}
// ReasonNEQ applies the NEQ predicate on the "reason" field.
func ReasonNEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldReason, v))
}
// ReasonIn applies the In predicate on the "reason" field.
func ReasonIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldReason, vs...))
}
// ReasonNotIn applies the NotIn predicate on the "reason" field.
func ReasonNotIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldReason, vs...))
}
// ReasonGT applies the GT predicate on the "reason" field.
func ReasonGT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldReason, v))
}
// ReasonGTE applies the GTE predicate on the "reason" field.
func ReasonGTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldReason, v))
}
// ReasonLT applies the LT predicate on the "reason" field.
func ReasonLT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldReason, v))
}
// ReasonLTE applies the LTE predicate on the "reason" field.
func ReasonLTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldReason, v))
}
// ReasonContains applies the Contains predicate on the "reason" field.
func ReasonContains(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContains(FieldReason, v))
}
// ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.
func ReasonHasPrefix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasPrefix(FieldReason, v))
}
// ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.
func ReasonHasSuffix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasSuffix(FieldReason, v))
}
// ReasonEqualFold applies the EqualFold predicate on the "reason" field.
func ReasonEqualFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEqualFold(FieldReason, v))
}
// ReasonContainsFold applies the ContainsFold predicate on the "reason" field.
func ReasonContainsFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContainsFold(FieldReason, v))
}
// OperatorEQ applies the EQ predicate on the "operator" field.
func OperatorEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldOperator, v))
}
// OperatorNEQ applies the NEQ predicate on the "operator" field.
func OperatorNEQ(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldOperator, v))
}
// OperatorIn applies the In predicate on the "operator" field.
func OperatorIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldOperator, vs...))
}
// OperatorNotIn applies the NotIn predicate on the "operator" field.
func OperatorNotIn(vs ...string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldOperator, vs...))
}
// OperatorGT applies the GT predicate on the "operator" field.
func OperatorGT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldOperator, v))
}
// OperatorGTE applies the GTE predicate on the "operator" field.
func OperatorGTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldOperator, v))
}
// OperatorLT applies the LT predicate on the "operator" field.
func OperatorLT(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldOperator, v))
}
// OperatorLTE applies the LTE predicate on the "operator" field.
func OperatorLTE(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldOperator, v))
}
// OperatorContains applies the Contains predicate on the "operator" field.
func OperatorContains(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContains(FieldOperator, v))
}
// OperatorHasPrefix applies the HasPrefix predicate on the "operator" field.
func OperatorHasPrefix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasPrefix(FieldOperator, v))
}
// OperatorHasSuffix applies the HasSuffix predicate on the "operator" field.
func OperatorHasSuffix(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldHasSuffix(FieldOperator, v))
}
// OperatorEqualFold applies the EqualFold predicate on the "operator" field.
func OperatorEqualFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEqualFold(FieldOperator, v))
}
// OperatorContainsFold applies the ContainsFold predicate on the "operator" field.
func OperatorContainsFold(v string) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldContainsFold(FieldOperator, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.TrialRecord {
return predicate.TrialRecord(sql.FieldLTE(FieldCreatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.TrialRecord) predicate.TrialRecord {
return predicate.TrialRecord(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.TrialRecord) predicate.TrialRecord {
return predicate.TrialRecord(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.TrialRecord) predicate.TrialRecord {
return predicate.TrialRecord(sql.NotPredicates(p))
}