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
+12 -14
View File
@@ -323,40 +323,32 @@ func init() {
attachment.DefaultMimeType = attachmentDescMimeType.Default.(string)
// attachment.MimeTypeValidator is a validator for the "mimeType" field. It is called by the builders before save.
attachment.MimeTypeValidator = attachmentDescMimeType.Validators[0].(func(string) error)
// attachmentDescArchived is the schema descriptor for archived field.
attachmentDescArchived := attachmentFields[12].Descriptor()
// attachment.DefaultArchived holds the default value on creation for the archived field.
attachment.DefaultArchived = attachmentDescArchived.Default.(bool)
// attachmentDescArchivedAt is the schema descriptor for archivedAt field.
attachmentDescArchivedAt := attachmentFields[13].Descriptor()
// attachment.DefaultArchivedAt holds the default value on creation for the archivedAt field.
attachment.DefaultArchivedAt = attachmentDescArchivedAt.Default.(int64)
// attachmentDescDeleted is the schema descriptor for deleted field.
attachmentDescDeleted := attachmentFields[14].Descriptor()
attachmentDescDeleted := attachmentFields[12].Descriptor()
// attachment.DefaultDeleted holds the default value on creation for the deleted field.
attachment.DefaultDeleted = attachmentDescDeleted.Default.(bool)
// attachmentDescDeletedAt is the schema descriptor for deletedAt field.
attachmentDescDeletedAt := attachmentFields[15].Descriptor()
attachmentDescDeletedAt := attachmentFields[13].Descriptor()
// attachment.DefaultDeletedAt holds the default value on creation for the deletedAt field.
attachment.DefaultDeletedAt = attachmentDescDeletedAt.Default.(int64)
// attachmentDescDeletedBy is the schema descriptor for deletedBy field.
attachmentDescDeletedBy := attachmentFields[16].Descriptor()
attachmentDescDeletedBy := attachmentFields[14].Descriptor()
// attachment.DefaultDeletedBy holds the default value on creation for the deletedBy field.
attachment.DefaultDeletedBy = attachmentDescDeletedBy.Default.(string)
// attachment.DeletedByValidator is a validator for the "deletedBy" field. It is called by the builders before save.
attachment.DeletedByValidator = attachmentDescDeletedBy.Validators[0].(func(string) error)
// attachmentDescDeletedReason is the schema descriptor for deletedReason field.
attachmentDescDeletedReason := attachmentFields[17].Descriptor()
attachmentDescDeletedReason := attachmentFields[15].Descriptor()
// attachment.DefaultDeletedReason holds the default value on creation for the deletedReason field.
attachment.DefaultDeletedReason = attachmentDescDeletedReason.Default.(string)
// attachment.DeletedReasonValidator is a validator for the "deletedReason" field. It is called by the builders before save.
attachment.DeletedReasonValidator = attachmentDescDeletedReason.Validators[0].(func(string) error)
// attachmentDescPurgedAt is the schema descriptor for purgedAt field.
attachmentDescPurgedAt := attachmentFields[18].Descriptor()
attachmentDescPurgedAt := attachmentFields[16].Descriptor()
// attachment.DefaultPurgedAt holds the default value on creation for the purgedAt field.
attachment.DefaultPurgedAt = attachmentDescPurgedAt.Default.(int64)
// attachmentDescPurgedBy is the schema descriptor for purgedBy field.
attachmentDescPurgedBy := attachmentFields[19].Descriptor()
attachmentDescPurgedBy := attachmentFields[17].Descriptor()
// attachment.DefaultPurgedBy holds the default value on creation for the purgedBy field.
attachment.DefaultPurgedBy = attachmentDescPurgedBy.Default.(string)
// attachment.PurgedByValidator is a validator for the "purgedBy" field. It is called by the builders before save.
@@ -1375,6 +1367,12 @@ func init() {
roleDescCreatedAt := roleFields[5].Descriptor()
// role.DefaultCreatedAt holds the default value on creation for the createdAt field.
role.DefaultCreatedAt = roleDescCreatedAt.Default.(func() time.Time)
// roleDescUpdatedAt is the schema descriptor for updatedAt field.
roleDescUpdatedAt := roleFields[6].Descriptor()
// role.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
role.DefaultUpdatedAt = roleDescUpdatedAt.Default.(func() time.Time)
// role.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
role.UpdateDefaultUpdatedAt = roleDescUpdatedAt.UpdateDefault.(func() time.Time)
// roleDescID is the schema descriptor for id field.
roleDescID := roleFields[0].Descriptor()
// role.IDValidator is a validator for the "id" field. It is called by the builders before save.