feat: 新增预警定时扫描器,移除附件归档字段并为角色表补充更新时间
This commit is contained in:
@@ -204,47 +204,6 @@ func (_u *AttachmentUpdate) ClearUploadedBy() *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 "archived_at" field.
|
||||
func (_u *AttachmentUpdate) SetArchivedAt(v int64) *AttachmentUpdate {
|
||||
_u.mutation.ResetArchivedAt()
|
||||
_u.mutation.SetArchivedAt(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableArchivedAt sets the "archived_at" 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 "archived_at" field.
|
||||
func (_u *AttachmentUpdate) AddArchivedAt(v int64) *AttachmentUpdate {
|
||||
_u.mutation.AddArchivedAt(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearArchivedAt clears the value of the "archived_at" field.
|
||||
func (_u *AttachmentUpdate) ClearArchivedAt() *AttachmentUpdate {
|
||||
_u.mutation.ClearArchivedAt()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetDeleted sets the "deleted" field.
|
||||
func (_u *AttachmentUpdate) SetDeleted(v bool) *AttachmentUpdate {
|
||||
_u.mutation.SetDeleted(v)
|
||||
@@ -483,18 +442,6 @@ func (_u *AttachmentUpdate) sqlSave(ctx context.Context) (_node int, err error)
|
||||
if _u.mutation.UploadedByCleared() {
|
||||
_spec.ClearField(attachment.FieldUploadedBy, field.TypeString)
|
||||
}
|
||||
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 _u.mutation.ArchivedAtCleared() {
|
||||
_spec.ClearField(attachment.FieldArchivedAt, field.TypeInt64)
|
||||
}
|
||||
if value, ok := _u.mutation.Deleted(); ok {
|
||||
_spec.SetField(attachment.FieldDeleted, field.TypeBool, value)
|
||||
}
|
||||
@@ -737,47 +684,6 @@ func (_u *AttachmentUpdateOne) ClearUploadedBy() *AttachmentUpdateOne {
|
||||
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 "archived_at" field.
|
||||
func (_u *AttachmentUpdateOne) SetArchivedAt(v int64) *AttachmentUpdateOne {
|
||||
_u.mutation.ResetArchivedAt()
|
||||
_u.mutation.SetArchivedAt(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableArchivedAt sets the "archived_at" 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 "archived_at" field.
|
||||
func (_u *AttachmentUpdateOne) AddArchivedAt(v int64) *AttachmentUpdateOne {
|
||||
_u.mutation.AddArchivedAt(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearArchivedAt clears the value of the "archived_at" field.
|
||||
func (_u *AttachmentUpdateOne) ClearArchivedAt() *AttachmentUpdateOne {
|
||||
_u.mutation.ClearArchivedAt()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetDeleted sets the "deleted" field.
|
||||
func (_u *AttachmentUpdateOne) SetDeleted(v bool) *AttachmentUpdateOne {
|
||||
_u.mutation.SetDeleted(v)
|
||||
@@ -1046,18 +952,6 @@ func (_u *AttachmentUpdateOne) sqlSave(ctx context.Context) (_node *Attachment,
|
||||
if _u.mutation.UploadedByCleared() {
|
||||
_spec.ClearField(attachment.FieldUploadedBy, field.TypeString)
|
||||
}
|
||||
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 _u.mutation.ArchivedAtCleared() {
|
||||
_spec.ClearField(attachment.FieldArchivedAt, field.TypeInt64)
|
||||
}
|
||||
if value, ok := _u.mutation.Deleted(); ok {
|
||||
_spec.SetField(attachment.FieldDeleted, field.TypeBool, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user