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
-88
View File
@@ -175,41 +175,6 @@ func (_u *AttachmentUpdate) SetNillableMimeType(v *string) *AttachmentUpdate {
return _u
}
// SetArchived sets the "archived" field.
func (_u *AttachmentUpdate) SetArchived(v bool) *AttachmentUpdate {
_u.mutation.SetArchived(v)
return _u
}
// SetNillableArchived sets the "archived" field if the given value is not nil.
func (_u *AttachmentUpdate) SetNillableArchived(v *bool) *AttachmentUpdate {
if v != nil {
_u.SetArchived(*v)
}
return _u
}
// SetArchivedAt sets the "archivedAt" field.
func (_u *AttachmentUpdate) SetArchivedAt(v int64) *AttachmentUpdate {
_u.mutation.ResetArchivedAt()
_u.mutation.SetArchivedAt(v)
return _u
}
// SetNillableArchivedAt sets the "archivedAt" field if the given value is not nil.
func (_u *AttachmentUpdate) SetNillableArchivedAt(v *int64) *AttachmentUpdate {
if v != nil {
_u.SetArchivedAt(*v)
}
return _u
}
// AddArchivedAt adds value to the "archivedAt" field.
func (_u *AttachmentUpdate) AddArchivedAt(v int64) *AttachmentUpdate {
_u.mutation.AddArchivedAt(v)
return _u
}
// SetDeleted sets the "deleted" field.
func (_u *AttachmentUpdate) SetDeleted(v bool) *AttachmentUpdate {
_u.mutation.SetDeleted(v)
@@ -456,15 +421,6 @@ func (_u *AttachmentUpdate) sqlSave(ctx context.Context) (_node int, err error)
if value, ok := _u.mutation.MimeType(); ok {
_spec.SetField(attachment.FieldMimeType, field.TypeString, value)
}
if value, ok := _u.mutation.Archived(); ok {
_spec.SetField(attachment.FieldArchived, field.TypeBool, value)
}
if value, ok := _u.mutation.ArchivedAt(); ok {
_spec.SetField(attachment.FieldArchivedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.AddedArchivedAt(); ok {
_spec.AddField(attachment.FieldArchivedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.Deleted(); ok {
_spec.SetField(attachment.FieldDeleted, field.TypeBool, value)
}
@@ -658,41 +614,6 @@ func (_u *AttachmentUpdateOne) SetNillableMimeType(v *string) *AttachmentUpdateO
return _u
}
// SetArchived sets the "archived" field.
func (_u *AttachmentUpdateOne) SetArchived(v bool) *AttachmentUpdateOne {
_u.mutation.SetArchived(v)
return _u
}
// SetNillableArchived sets the "archived" field if the given value is not nil.
func (_u *AttachmentUpdateOne) SetNillableArchived(v *bool) *AttachmentUpdateOne {
if v != nil {
_u.SetArchived(*v)
}
return _u
}
// SetArchivedAt sets the "archivedAt" field.
func (_u *AttachmentUpdateOne) SetArchivedAt(v int64) *AttachmentUpdateOne {
_u.mutation.ResetArchivedAt()
_u.mutation.SetArchivedAt(v)
return _u
}
// SetNillableArchivedAt sets the "archivedAt" field if the given value is not nil.
func (_u *AttachmentUpdateOne) SetNillableArchivedAt(v *int64) *AttachmentUpdateOne {
if v != nil {
_u.SetArchivedAt(*v)
}
return _u
}
// AddArchivedAt adds value to the "archivedAt" field.
func (_u *AttachmentUpdateOne) AddArchivedAt(v int64) *AttachmentUpdateOne {
_u.mutation.AddArchivedAt(v)
return _u
}
// SetDeleted sets the "deleted" field.
func (_u *AttachmentUpdateOne) SetDeleted(v bool) *AttachmentUpdateOne {
_u.mutation.SetDeleted(v)
@@ -969,15 +890,6 @@ func (_u *AttachmentUpdateOne) sqlSave(ctx context.Context) (_node *Attachment,
if value, ok := _u.mutation.MimeType(); ok {
_spec.SetField(attachment.FieldMimeType, field.TypeString, value)
}
if value, ok := _u.mutation.Archived(); ok {
_spec.SetField(attachment.FieldArchived, field.TypeBool, value)
}
if value, ok := _u.mutation.ArchivedAt(); ok {
_spec.SetField(attachment.FieldArchivedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.AddedArchivedAt(); ok {
_spec.AddField(attachment.FieldArchivedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.Deleted(); ok {
_spec.SetField(attachment.FieldDeleted, field.TypeBool, value)
}