feat: 新增预警与附件模块,优化工位派工功能

1. 新增预警规则、预警消息、业务附件数据库表与CRUD逻辑
2. 为拧紧记录添加审核人、审核时间字段及审核留痕功能
3. 优化产线点位类型与编号描述,更新工位组合下发菜单名称为工艺路线派工
4. 新增上传文件获取原文件名与大小的工具方法
5. 在系统管理菜单新增预警中心与附件中心入口
This commit is contained in:
SunYF
2026-09-14 16:31:08 +08:00
parent 0ab21b1234
commit 5c3b747a20
399 changed files with 147674 additions and 2213 deletions
+127
View File
@@ -0,0 +1,127 @@
// Code generated by ent, DO NOT EDIT.
package eventlog
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the eventlog type in the database.
Label = "event_log"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldEventType holds the string denoting the eventtype field in the database.
FieldEventType = "event_type"
// FieldWorkOrderNo holds the string denoting the workorderno field in the database.
FieldWorkOrderNo = "work_order_no"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldEntityType holds the string denoting the entitytype field in the database.
FieldEntityType = "entity_type"
// FieldEntityId holds the string denoting the entityid field in the database.
FieldEntityId = "entity_id"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldPayload holds the string denoting the payload field in the database.
FieldPayload = "payload"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the eventlog in the database.
Table = "event_log"
)
// Columns holds all SQL columns for eventlog fields.
var Columns = []string{
FieldID,
FieldEventType,
FieldWorkOrderNo,
FieldOperator,
FieldEntityType,
FieldEntityId,
FieldDescription,
FieldPayload,
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 (
// EventTypeValidator is a validator for the "eventType" field. It is called by the builders before save.
EventTypeValidator func(string) error
// DefaultWorkOrderNo holds the default value on creation for the "workOrderNo" field.
DefaultWorkOrderNo string
// WorkOrderNoValidator is a validator for the "workOrderNo" field. It is called by the builders before save.
WorkOrderNoValidator 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
// DefaultEntityType holds the default value on creation for the "entityType" field.
DefaultEntityType string
// EntityTypeValidator is a validator for the "entityType" field. It is called by the builders before save.
EntityTypeValidator func(string) error
// DefaultEntityId holds the default value on creation for the "entityId" field.
DefaultEntityId string
// EntityIdValidator is a validator for the "entityId" field. It is called by the builders before save.
EntityIdValidator func(string) error
// DefaultDescription holds the default value on creation for the "description" field.
DefaultDescription string
// 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 EventLog 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()
}
// ByEventType orders the results by the eventType field.
func ByEventType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEventType, opts...).ToFunc()
}
// ByWorkOrderNo orders the results by the workOrderNo field.
func ByWorkOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldWorkOrderNo, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByEntityType orders the results by the entityType field.
func ByEntityType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityType, opts...).ToFunc()
}
// ByEntityId orders the results by the entityId field.
func ByEntityId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityId, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
+545
View File
@@ -0,0 +1,545 @@
// Code generated by ent, DO NOT EDIT.
package eventlog
import (
"bj_power_mes/predicate"
"time"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldID, id))
}
// EventType applies equality check predicate on the "eventType" field. It's identical to EventTypeEQ.
func EventType(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldEventType, v))
}
// WorkOrderNo applies equality check predicate on the "workOrderNo" field. It's identical to WorkOrderNoEQ.
func WorkOrderNo(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldWorkOrderNo, v))
}
// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ.
func Operator(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldOperator, v))
}
// EntityType applies equality check predicate on the "entityType" field. It's identical to EntityTypeEQ.
func EntityType(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldEntityType, v))
}
// EntityId applies equality check predicate on the "entityId" field. It's identical to EntityIdEQ.
func EntityId(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldEntityId, v))
}
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func Description(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldDescription, v))
}
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldCreatedAt, v))
}
// EventTypeEQ applies the EQ predicate on the "eventType" field.
func EventTypeEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldEventType, v))
}
// EventTypeNEQ applies the NEQ predicate on the "eventType" field.
func EventTypeNEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldEventType, v))
}
// EventTypeIn applies the In predicate on the "eventType" field.
func EventTypeIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldEventType, vs...))
}
// EventTypeNotIn applies the NotIn predicate on the "eventType" field.
func EventTypeNotIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldEventType, vs...))
}
// EventTypeGT applies the GT predicate on the "eventType" field.
func EventTypeGT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldEventType, v))
}
// EventTypeGTE applies the GTE predicate on the "eventType" field.
func EventTypeGTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldEventType, v))
}
// EventTypeLT applies the LT predicate on the "eventType" field.
func EventTypeLT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldEventType, v))
}
// EventTypeLTE applies the LTE predicate on the "eventType" field.
func EventTypeLTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldEventType, v))
}
// EventTypeContains applies the Contains predicate on the "eventType" field.
func EventTypeContains(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContains(FieldEventType, v))
}
// EventTypeHasPrefix applies the HasPrefix predicate on the "eventType" field.
func EventTypeHasPrefix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasPrefix(FieldEventType, v))
}
// EventTypeHasSuffix applies the HasSuffix predicate on the "eventType" field.
func EventTypeHasSuffix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasSuffix(FieldEventType, v))
}
// EventTypeEqualFold applies the EqualFold predicate on the "eventType" field.
func EventTypeEqualFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEqualFold(FieldEventType, v))
}
// EventTypeContainsFold applies the ContainsFold predicate on the "eventType" field.
func EventTypeContainsFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContainsFold(FieldEventType, v))
}
// WorkOrderNoEQ applies the EQ predicate on the "workOrderNo" field.
func WorkOrderNoEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldWorkOrderNo, v))
}
// WorkOrderNoNEQ applies the NEQ predicate on the "workOrderNo" field.
func WorkOrderNoNEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldWorkOrderNo, v))
}
// WorkOrderNoIn applies the In predicate on the "workOrderNo" field.
func WorkOrderNoIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldWorkOrderNo, vs...))
}
// WorkOrderNoNotIn applies the NotIn predicate on the "workOrderNo" field.
func WorkOrderNoNotIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldWorkOrderNo, vs...))
}
// WorkOrderNoGT applies the GT predicate on the "workOrderNo" field.
func WorkOrderNoGT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldWorkOrderNo, v))
}
// WorkOrderNoGTE applies the GTE predicate on the "workOrderNo" field.
func WorkOrderNoGTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldWorkOrderNo, v))
}
// WorkOrderNoLT applies the LT predicate on the "workOrderNo" field.
func WorkOrderNoLT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldWorkOrderNo, v))
}
// WorkOrderNoLTE applies the LTE predicate on the "workOrderNo" field.
func WorkOrderNoLTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldWorkOrderNo, v))
}
// WorkOrderNoContains applies the Contains predicate on the "workOrderNo" field.
func WorkOrderNoContains(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContains(FieldWorkOrderNo, v))
}
// WorkOrderNoHasPrefix applies the HasPrefix predicate on the "workOrderNo" field.
func WorkOrderNoHasPrefix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasPrefix(FieldWorkOrderNo, v))
}
// WorkOrderNoHasSuffix applies the HasSuffix predicate on the "workOrderNo" field.
func WorkOrderNoHasSuffix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasSuffix(FieldWorkOrderNo, v))
}
// WorkOrderNoEqualFold applies the EqualFold predicate on the "workOrderNo" field.
func WorkOrderNoEqualFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEqualFold(FieldWorkOrderNo, v))
}
// WorkOrderNoContainsFold applies the ContainsFold predicate on the "workOrderNo" field.
func WorkOrderNoContainsFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContainsFold(FieldWorkOrderNo, v))
}
// OperatorEQ applies the EQ predicate on the "operator" field.
func OperatorEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldOperator, v))
}
// OperatorNEQ applies the NEQ predicate on the "operator" field.
func OperatorNEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldOperator, v))
}
// OperatorIn applies the In predicate on the "operator" field.
func OperatorIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldOperator, vs...))
}
// OperatorNotIn applies the NotIn predicate on the "operator" field.
func OperatorNotIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldOperator, vs...))
}
// OperatorGT applies the GT predicate on the "operator" field.
func OperatorGT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldOperator, v))
}
// OperatorGTE applies the GTE predicate on the "operator" field.
func OperatorGTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldOperator, v))
}
// OperatorLT applies the LT predicate on the "operator" field.
func OperatorLT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldOperator, v))
}
// OperatorLTE applies the LTE predicate on the "operator" field.
func OperatorLTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldOperator, v))
}
// OperatorContains applies the Contains predicate on the "operator" field.
func OperatorContains(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContains(FieldOperator, v))
}
// OperatorHasPrefix applies the HasPrefix predicate on the "operator" field.
func OperatorHasPrefix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasPrefix(FieldOperator, v))
}
// OperatorHasSuffix applies the HasSuffix predicate on the "operator" field.
func OperatorHasSuffix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasSuffix(FieldOperator, v))
}
// OperatorEqualFold applies the EqualFold predicate on the "operator" field.
func OperatorEqualFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEqualFold(FieldOperator, v))
}
// OperatorContainsFold applies the ContainsFold predicate on the "operator" field.
func OperatorContainsFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContainsFold(FieldOperator, v))
}
// EntityTypeEQ applies the EQ predicate on the "entityType" field.
func EntityTypeEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldEntityType, v))
}
// EntityTypeNEQ applies the NEQ predicate on the "entityType" field.
func EntityTypeNEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldEntityType, v))
}
// EntityTypeIn applies the In predicate on the "entityType" field.
func EntityTypeIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldEntityType, vs...))
}
// EntityTypeNotIn applies the NotIn predicate on the "entityType" field.
func EntityTypeNotIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldEntityType, vs...))
}
// EntityTypeGT applies the GT predicate on the "entityType" field.
func EntityTypeGT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldEntityType, v))
}
// EntityTypeGTE applies the GTE predicate on the "entityType" field.
func EntityTypeGTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldEntityType, v))
}
// EntityTypeLT applies the LT predicate on the "entityType" field.
func EntityTypeLT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldEntityType, v))
}
// EntityTypeLTE applies the LTE predicate on the "entityType" field.
func EntityTypeLTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldEntityType, v))
}
// EntityTypeContains applies the Contains predicate on the "entityType" field.
func EntityTypeContains(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContains(FieldEntityType, v))
}
// EntityTypeHasPrefix applies the HasPrefix predicate on the "entityType" field.
func EntityTypeHasPrefix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasPrefix(FieldEntityType, v))
}
// EntityTypeHasSuffix applies the HasSuffix predicate on the "entityType" field.
func EntityTypeHasSuffix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasSuffix(FieldEntityType, v))
}
// EntityTypeEqualFold applies the EqualFold predicate on the "entityType" field.
func EntityTypeEqualFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEqualFold(FieldEntityType, v))
}
// EntityTypeContainsFold applies the ContainsFold predicate on the "entityType" field.
func EntityTypeContainsFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContainsFold(FieldEntityType, v))
}
// EntityIdEQ applies the EQ predicate on the "entityId" field.
func EntityIdEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldEntityId, v))
}
// EntityIdNEQ applies the NEQ predicate on the "entityId" field.
func EntityIdNEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldEntityId, v))
}
// EntityIdIn applies the In predicate on the "entityId" field.
func EntityIdIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldEntityId, vs...))
}
// EntityIdNotIn applies the NotIn predicate on the "entityId" field.
func EntityIdNotIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldEntityId, vs...))
}
// EntityIdGT applies the GT predicate on the "entityId" field.
func EntityIdGT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldEntityId, v))
}
// EntityIdGTE applies the GTE predicate on the "entityId" field.
func EntityIdGTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldEntityId, v))
}
// EntityIdLT applies the LT predicate on the "entityId" field.
func EntityIdLT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldEntityId, v))
}
// EntityIdLTE applies the LTE predicate on the "entityId" field.
func EntityIdLTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldEntityId, v))
}
// EntityIdContains applies the Contains predicate on the "entityId" field.
func EntityIdContains(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContains(FieldEntityId, v))
}
// EntityIdHasPrefix applies the HasPrefix predicate on the "entityId" field.
func EntityIdHasPrefix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasPrefix(FieldEntityId, v))
}
// EntityIdHasSuffix applies the HasSuffix predicate on the "entityId" field.
func EntityIdHasSuffix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasSuffix(FieldEntityId, v))
}
// EntityIdEqualFold applies the EqualFold predicate on the "entityId" field.
func EntityIdEqualFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEqualFold(FieldEntityId, v))
}
// EntityIdContainsFold applies the ContainsFold predicate on the "entityId" field.
func EntityIdContainsFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContainsFold(FieldEntityId, v))
}
// DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldDescription, v))
}
// DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNEQ(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldDescription, v))
}
// DescriptionIn applies the In predicate on the "description" field.
func DescriptionIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldDescription, vs...))
}
// DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotIn(vs ...string) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldDescription, vs...))
}
// DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldDescription, v))
}
// DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionGTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldDescription, v))
}
// DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLT(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldDescription, v))
}
// DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionLTE(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldDescription, v))
}
// DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContains(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContains(FieldDescription, v))
}
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasPrefix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasPrefix(FieldDescription, v))
}
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionHasSuffix(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldHasSuffix(FieldDescription, v))
}
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionEqualFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldEqualFold(FieldDescription, v))
}
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionContainsFold(v string) predicate.EventLog {
return predicate.EventLog(sql.FieldContainsFold(FieldDescription, v))
}
// PayloadIsNil applies the IsNil predicate on the "payload" field.
func PayloadIsNil() predicate.EventLog {
return predicate.EventLog(sql.FieldIsNull(FieldPayload))
}
// PayloadNotNil applies the NotNil predicate on the "payload" field.
func PayloadNotNil() predicate.EventLog {
return predicate.EventLog(sql.FieldNotNull(FieldPayload))
}
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtEQ(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
func CreatedAtNEQ(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "createdAt" field.
func CreatedAtIn(vs ...time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
func CreatedAtNotIn(vs ...time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "createdAt" field.
func CreatedAtGT(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
func CreatedAtGTE(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "createdAt" field.
func CreatedAtLT(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
func CreatedAtLTE(v time.Time) predicate.EventLog {
return predicate.EventLog(sql.FieldLTE(FieldCreatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.EventLog) predicate.EventLog {
return predicate.EventLog(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.EventLog) predicate.EventLog {
return predicate.EventLog(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.EventLog) predicate.EventLog {
return predicate.EventLog(sql.NotPredicates(p))
}