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
-20
View File
@@ -35,10 +35,6 @@ const (
FieldFileMd5 = "file_md5"
// FieldMimeType holds the string denoting the mimetype field in the database.
FieldMimeType = "mime_type"
// FieldArchived holds the string denoting the archived field in the database.
FieldArchived = "archived"
// FieldArchivedAt holds the string denoting the archivedat field in the database.
FieldArchivedAt = "archived_at"
// FieldDeleted holds the string denoting the deleted field in the database.
FieldDeleted = "deleted"
// FieldDeletedAt holds the string denoting the deletedat field in the database.
@@ -69,8 +65,6 @@ var Columns = []string{
FieldFileExt,
FieldFileMd5,
FieldMimeType,
FieldArchived,
FieldArchivedAt,
FieldDeleted,
FieldDeletedAt,
FieldDeletedBy,
@@ -122,10 +116,6 @@ var (
DefaultMimeType string
// MimeTypeValidator is a validator for the "mimeType" field. It is called by the builders before save.
MimeTypeValidator func(string) error
// DefaultArchived holds the default value on creation for the "archived" field.
DefaultArchived bool
// DefaultArchivedAt holds the default value on creation for the "archivedAt" field.
DefaultArchivedAt int64
// DefaultDeleted holds the default value on creation for the "deleted" field.
DefaultDeleted bool
// DefaultDeletedAt holds the default value on creation for the "deletedAt" field.
@@ -211,16 +201,6 @@ func ByMimeType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMimeType, opts...).ToFunc()
}
// ByArchived orders the results by the archived field.
func ByArchived(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldArchived, opts...).ToFunc()
}
// ByArchivedAt orders the results by the archivedAt field.
func ByArchivedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldArchivedAt, opts...).ToFunc()
}
// ByDeleted orders the results by the deleted field.
func ByDeleted(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeleted, opts...).ToFunc()
-60
View File
@@ -109,16 +109,6 @@ func MimeType(v string) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldMimeType, v))
}
// Archived applies equality check predicate on the "archived" field. It's identical to ArchivedEQ.
func Archived(v bool) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldArchived, v))
}
// ArchivedAt applies equality check predicate on the "archivedAt" field. It's identical to ArchivedAtEQ.
func ArchivedAt(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldArchivedAt, v))
}
// Deleted applies equality check predicate on the "deleted" field. It's identical to DeletedEQ.
func Deleted(v bool) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldDeleted, v))
@@ -814,56 +804,6 @@ func MimeTypeContainsFold(v string) predicate.Attachment {
return predicate.Attachment(sql.FieldContainsFold(FieldMimeType, v))
}
// ArchivedEQ applies the EQ predicate on the "archived" field.
func ArchivedEQ(v bool) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldArchived, v))
}
// ArchivedNEQ applies the NEQ predicate on the "archived" field.
func ArchivedNEQ(v bool) predicate.Attachment {
return predicate.Attachment(sql.FieldNEQ(FieldArchived, v))
}
// ArchivedAtEQ applies the EQ predicate on the "archivedAt" field.
func ArchivedAtEQ(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldArchivedAt, v))
}
// ArchivedAtNEQ applies the NEQ predicate on the "archivedAt" field.
func ArchivedAtNEQ(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldNEQ(FieldArchivedAt, v))
}
// ArchivedAtIn applies the In predicate on the "archivedAt" field.
func ArchivedAtIn(vs ...int64) predicate.Attachment {
return predicate.Attachment(sql.FieldIn(FieldArchivedAt, vs...))
}
// ArchivedAtNotIn applies the NotIn predicate on the "archivedAt" field.
func ArchivedAtNotIn(vs ...int64) predicate.Attachment {
return predicate.Attachment(sql.FieldNotIn(FieldArchivedAt, vs...))
}
// ArchivedAtGT applies the GT predicate on the "archivedAt" field.
func ArchivedAtGT(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldGT(FieldArchivedAt, v))
}
// ArchivedAtGTE applies the GTE predicate on the "archivedAt" field.
func ArchivedAtGTE(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldGTE(FieldArchivedAt, v))
}
// ArchivedAtLT applies the LT predicate on the "archivedAt" field.
func ArchivedAtLT(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldLT(FieldArchivedAt, v))
}
// ArchivedAtLTE applies the LTE predicate on the "archivedAt" field.
func ArchivedAtLTE(v int64) predicate.Attachment {
return predicate.Attachment(sql.FieldLTE(FieldArchivedAt, v))
}
// DeletedEQ applies the EQ predicate on the "deleted" field.
func DeletedEQ(v bool) predicate.Attachment {
return predicate.Attachment(sql.FieldEQ(FieldDeleted, v))