feat: 新增预警定时扫描器,移除附件归档字段并为角色表补充更新时间

This commit is contained in:
SunYF
2026-10-31 15:41:27 +08:00
parent 11dbdaae75
commit 0c03d32682
107 changed files with 10790 additions and 1844 deletions
+55
View File
@@ -74,6 +74,11 @@ func CreatedAt(v time.Time) predicate.Role {
return predicate.Role(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updatedAt" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.Role {
return predicate.Role(sql.FieldEQ(FieldUpdatedAt, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Role {
return predicate.Role(sql.FieldEQ(FieldName, v))
@@ -319,6 +324,56 @@ func CreatedAtLTE(v time.Time) predicate.Role {
return predicate.Role(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updatedAt" field.
func UpdatedAtEQ(v time.Time) predicate.Role {
return predicate.Role(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updatedAt" field.
func UpdatedAtNEQ(v time.Time) predicate.Role {
return predicate.Role(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updatedAt" field.
func UpdatedAtIn(vs ...time.Time) predicate.Role {
return predicate.Role(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updatedAt" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.Role {
return predicate.Role(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updatedAt" field.
func UpdatedAtGT(v time.Time) predicate.Role {
return predicate.Role(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updatedAt" field.
func UpdatedAtGTE(v time.Time) predicate.Role {
return predicate.Role(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updatedAt" field.
func UpdatedAtLT(v time.Time) predicate.Role {
return predicate.Role(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updatedAt" field.
func UpdatedAtLTE(v time.Time) predicate.Role {
return predicate.Role(sql.FieldLTE(FieldUpdatedAt, v))
}
// UpdatedAtIsNil applies the IsNil predicate on the "updatedAt" field.
func UpdatedAtIsNil() predicate.Role {
return predicate.Role(sql.FieldIsNull(FieldUpdatedAt))
}
// UpdatedAtNotNil applies the NotNil predicate on the "updatedAt" field.
func UpdatedAtNotNil() predicate.Role {
return predicate.Role(sql.FieldNotNull(FieldUpdatedAt))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Role) predicate.Role {
return predicate.Role(sql.AndPredicates(predicates...))