feat: 新增预警定时扫描器,移除附件归档字段并为角色表补充更新时间
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package alert
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the alert type in the database.
|
||||
Label = "alert"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldRuleCode holds the string denoting the rule_code field in the database.
|
||||
FieldRuleCode = "rule_code"
|
||||
// FieldLevel holds the string denoting the level field in the database.
|
||||
FieldLevel = "level"
|
||||
// FieldTitle holds the string denoting the title field in the database.
|
||||
FieldTitle = "title"
|
||||
// FieldContent holds the string denoting the content field in the database.
|
||||
FieldContent = "content"
|
||||
// FieldTarget holds the string denoting the target field in the database.
|
||||
FieldTarget = "target"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// Table holds the table name of the alert in the database.
|
||||
Table = "alerts"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for alert fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldRuleCode,
|
||||
FieldLevel,
|
||||
FieldTitle,
|
||||
FieldContent,
|
||||
FieldTarget,
|
||||
FieldStatus,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultLevel holds the default value on creation for the "level" field.
|
||||
DefaultLevel string
|
||||
// LevelValidator is a validator for the "level" field. It is called by the builders before save.
|
||||
LevelValidator 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
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Alert 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()
|
||||
}
|
||||
|
||||
// ByRuleCode orders the results by the rule_code field.
|
||||
func ByRuleCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRuleCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLevel orders the results by the level field.
|
||||
func ByLevel(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLevel, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTitle orders the results by the title field.
|
||||
func ByTitle(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTitle, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByContent orders the results by the content field.
|
||||
func ByContent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldContent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTarget orders the results by the target field.
|
||||
func ByTarget(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTarget, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,589 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package alert
|
||||
|
||||
import (
|
||||
"bj_power_wms/ent/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// RuleCode applies equality check predicate on the "rule_code" field. It's identical to RuleCodeEQ.
|
||||
func RuleCode(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// Level applies equality check predicate on the "level" field. It's identical to LevelEQ.
|
||||
func Level(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldLevel, v))
|
||||
}
|
||||
|
||||
// Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
|
||||
func Title(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTitle, v))
|
||||
}
|
||||
|
||||
// Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
|
||||
func Content(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// Target applies equality check predicate on the "target" field. It's identical to TargetEQ.
|
||||
func Target(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTarget, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// RuleCodeEQ applies the EQ predicate on the "rule_code" field.
|
||||
func RuleCodeEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeNEQ applies the NEQ predicate on the "rule_code" field.
|
||||
func RuleCodeNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeIn applies the In predicate on the "rule_code" field.
|
||||
func RuleCodeIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldRuleCode, vs...))
|
||||
}
|
||||
|
||||
// RuleCodeNotIn applies the NotIn predicate on the "rule_code" field.
|
||||
func RuleCodeNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldRuleCode, vs...))
|
||||
}
|
||||
|
||||
// RuleCodeGT applies the GT predicate on the "rule_code" field.
|
||||
func RuleCodeGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeGTE applies the GTE predicate on the "rule_code" field.
|
||||
func RuleCodeGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeLT applies the LT predicate on the "rule_code" field.
|
||||
func RuleCodeLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeLTE applies the LTE predicate on the "rule_code" field.
|
||||
func RuleCodeLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeContains applies the Contains predicate on the "rule_code" field.
|
||||
func RuleCodeContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeHasPrefix applies the HasPrefix predicate on the "rule_code" field.
|
||||
func RuleCodeHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeHasSuffix applies the HasSuffix predicate on the "rule_code" field.
|
||||
func RuleCodeHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeEqualFold applies the EqualFold predicate on the "rule_code" field.
|
||||
func RuleCodeEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// RuleCodeContainsFold applies the ContainsFold predicate on the "rule_code" field.
|
||||
func RuleCodeContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldRuleCode, v))
|
||||
}
|
||||
|
||||
// LevelEQ applies the EQ predicate on the "level" field.
|
||||
func LevelEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelNEQ applies the NEQ predicate on the "level" field.
|
||||
func LevelNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelIn applies the In predicate on the "level" field.
|
||||
func LevelIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldLevel, vs...))
|
||||
}
|
||||
|
||||
// LevelNotIn applies the NotIn predicate on the "level" field.
|
||||
func LevelNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldLevel, vs...))
|
||||
}
|
||||
|
||||
// LevelGT applies the GT predicate on the "level" field.
|
||||
func LevelGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelGTE applies the GTE predicate on the "level" field.
|
||||
func LevelGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelLT applies the LT predicate on the "level" field.
|
||||
func LevelLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelLTE applies the LTE predicate on the "level" field.
|
||||
func LevelLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelContains applies the Contains predicate on the "level" field.
|
||||
func LevelContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelHasPrefix applies the HasPrefix predicate on the "level" field.
|
||||
func LevelHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelHasSuffix applies the HasSuffix predicate on the "level" field.
|
||||
func LevelHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelEqualFold applies the EqualFold predicate on the "level" field.
|
||||
func LevelEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelContainsFold applies the ContainsFold predicate on the "level" field.
|
||||
func LevelContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldLevel, v))
|
||||
}
|
||||
|
||||
// TitleEQ applies the EQ predicate on the "title" field.
|
||||
func TitleEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleNEQ applies the NEQ predicate on the "title" field.
|
||||
func TitleNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleIn applies the In predicate on the "title" field.
|
||||
func TitleIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldTitle, vs...))
|
||||
}
|
||||
|
||||
// TitleNotIn applies the NotIn predicate on the "title" field.
|
||||
func TitleNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldTitle, vs...))
|
||||
}
|
||||
|
||||
// TitleGT applies the GT predicate on the "title" field.
|
||||
func TitleGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleGTE applies the GTE predicate on the "title" field.
|
||||
func TitleGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleLT applies the LT predicate on the "title" field.
|
||||
func TitleLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleLTE applies the LTE predicate on the "title" field.
|
||||
func TitleLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleContains applies the Contains predicate on the "title" field.
|
||||
func TitleContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleHasPrefix applies the HasPrefix predicate on the "title" field.
|
||||
func TitleHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleHasSuffix applies the HasSuffix predicate on the "title" field.
|
||||
func TitleHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleEqualFold applies the EqualFold predicate on the "title" field.
|
||||
func TitleEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleContainsFold applies the ContainsFold predicate on the "title" field.
|
||||
func TitleContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldTitle, v))
|
||||
}
|
||||
|
||||
// ContentEQ applies the EQ predicate on the "content" field.
|
||||
func ContentEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentNEQ applies the NEQ predicate on the "content" field.
|
||||
func ContentNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentIn applies the In predicate on the "content" field.
|
||||
func ContentIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldContent, vs...))
|
||||
}
|
||||
|
||||
// ContentNotIn applies the NotIn predicate on the "content" field.
|
||||
func ContentNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldContent, vs...))
|
||||
}
|
||||
|
||||
// ContentGT applies the GT predicate on the "content" field.
|
||||
func ContentGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentGTE applies the GTE predicate on the "content" field.
|
||||
func ContentGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentLT applies the LT predicate on the "content" field.
|
||||
func ContentLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentLTE applies the LTE predicate on the "content" field.
|
||||
func ContentLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentContains applies the Contains predicate on the "content" field.
|
||||
func ContentContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentHasPrefix applies the HasPrefix predicate on the "content" field.
|
||||
func ContentHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentHasSuffix applies the HasSuffix predicate on the "content" field.
|
||||
func ContentHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentEqualFold applies the EqualFold predicate on the "content" field.
|
||||
func ContentEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentContainsFold applies the ContainsFold predicate on the "content" field.
|
||||
func ContentContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldContent, v))
|
||||
}
|
||||
|
||||
// TargetEQ applies the EQ predicate on the "target" field.
|
||||
func TargetEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetNEQ applies the NEQ predicate on the "target" field.
|
||||
func TargetNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetIn applies the In predicate on the "target" field.
|
||||
func TargetIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldTarget, vs...))
|
||||
}
|
||||
|
||||
// TargetNotIn applies the NotIn predicate on the "target" field.
|
||||
func TargetNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldTarget, vs...))
|
||||
}
|
||||
|
||||
// TargetGT applies the GT predicate on the "target" field.
|
||||
func TargetGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetGTE applies the GTE predicate on the "target" field.
|
||||
func TargetGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetLT applies the LT predicate on the "target" field.
|
||||
func TargetLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetLTE applies the LTE predicate on the "target" field.
|
||||
func TargetLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetContains applies the Contains predicate on the "target" field.
|
||||
func TargetContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetHasPrefix applies the HasPrefix predicate on the "target" field.
|
||||
func TargetHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetHasSuffix applies the HasSuffix predicate on the "target" field.
|
||||
func TargetHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetIsNil applies the IsNil predicate on the "target" field.
|
||||
func TargetIsNil() predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIsNull(FieldTarget))
|
||||
}
|
||||
|
||||
// TargetNotNil applies the NotNil predicate on the "target" field.
|
||||
func TargetNotNil() predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotNull(FieldTarget))
|
||||
}
|
||||
|
||||
// TargetEqualFold applies the EqualFold predicate on the "target" field.
|
||||
func TargetEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetContainsFold applies the ContainsFold predicate on the "target" field.
|
||||
func TargetContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldTarget, v))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusGT applies the GT predicate on the "status" field.
|
||||
func StatusGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusGTE applies the GTE predicate on the "status" field.
|
||||
func StatusGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLT applies the LT predicate on the "status" field.
|
||||
func StatusLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLTE applies the LTE predicate on the "status" field.
|
||||
func StatusLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContains applies the Contains predicate on the "status" field.
|
||||
func StatusContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
|
||||
func StatusHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
|
||||
func StatusHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusEqualFold applies the EqualFold predicate on the "status" field.
|
||||
func StatusEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
|
||||
func StatusContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v int64) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Alert) predicate.Alert {
|
||||
return predicate.Alert(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Alert) predicate.Alert {
|
||||
return predicate.Alert(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Alert) predicate.Alert {
|
||||
return predicate.Alert(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user