feat: 大屏新增虚拟工位滚动栏与多订单轮播,附件表增加删除原因及彻底清除留痕字段

This commit is contained in:
SunYF
2026-10-29 18:16:53 +08:00
parent 4d3c4e2c3a
commit 11dbdaae75
75 changed files with 6801 additions and 965 deletions
+176
View File
@@ -306,6 +306,73 @@ func (_u *AttachmentUpdate) ClearDeletedBy() *AttachmentUpdate {
return _u
}
// SetDeletedReason sets the "deleted_reason" field.
func (_u *AttachmentUpdate) SetDeletedReason(v string) *AttachmentUpdate {
_u.mutation.SetDeletedReason(v)
return _u
}
// SetNillableDeletedReason sets the "deleted_reason" field if the given value is not nil.
func (_u *AttachmentUpdate) SetNillableDeletedReason(v *string) *AttachmentUpdate {
if v != nil {
_u.SetDeletedReason(*v)
}
return _u
}
// ClearDeletedReason clears the value of the "deleted_reason" field.
func (_u *AttachmentUpdate) ClearDeletedReason() *AttachmentUpdate {
_u.mutation.ClearDeletedReason()
return _u
}
// SetPurgedAt sets the "purged_at" field.
func (_u *AttachmentUpdate) SetPurgedAt(v int64) *AttachmentUpdate {
_u.mutation.ResetPurgedAt()
_u.mutation.SetPurgedAt(v)
return _u
}
// SetNillablePurgedAt sets the "purged_at" field if the given value is not nil.
func (_u *AttachmentUpdate) SetNillablePurgedAt(v *int64) *AttachmentUpdate {
if v != nil {
_u.SetPurgedAt(*v)
}
return _u
}
// AddPurgedAt adds value to the "purged_at" field.
func (_u *AttachmentUpdate) AddPurgedAt(v int64) *AttachmentUpdate {
_u.mutation.AddPurgedAt(v)
return _u
}
// ClearPurgedAt clears the value of the "purged_at" field.
func (_u *AttachmentUpdate) ClearPurgedAt() *AttachmentUpdate {
_u.mutation.ClearPurgedAt()
return _u
}
// SetPurgedBy sets the "purged_by" field.
func (_u *AttachmentUpdate) SetPurgedBy(v string) *AttachmentUpdate {
_u.mutation.SetPurgedBy(v)
return _u
}
// SetNillablePurgedBy sets the "purged_by" field if the given value is not nil.
func (_u *AttachmentUpdate) SetNillablePurgedBy(v *string) *AttachmentUpdate {
if v != nil {
_u.SetPurgedBy(*v)
}
return _u
}
// ClearPurgedBy clears the value of the "purged_by" field.
func (_u *AttachmentUpdate) ClearPurgedBy() *AttachmentUpdate {
_u.mutation.ClearPurgedBy()
return _u
}
// SetCreatedAt sets the "created_at" field.
func (_u *AttachmentUpdate) SetCreatedAt(v int64) *AttachmentUpdate {
_u.mutation.ResetCreatedAt()
@@ -446,6 +513,27 @@ func (_u *AttachmentUpdate) sqlSave(ctx context.Context) (_node int, err error)
if _u.mutation.DeletedByCleared() {
_spec.ClearField(attachment.FieldDeletedBy, field.TypeString)
}
if value, ok := _u.mutation.DeletedReason(); ok {
_spec.SetField(attachment.FieldDeletedReason, field.TypeString, value)
}
if _u.mutation.DeletedReasonCleared() {
_spec.ClearField(attachment.FieldDeletedReason, field.TypeString)
}
if value, ok := _u.mutation.PurgedAt(); ok {
_spec.SetField(attachment.FieldPurgedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.AddedPurgedAt(); ok {
_spec.AddField(attachment.FieldPurgedAt, field.TypeInt64, value)
}
if _u.mutation.PurgedAtCleared() {
_spec.ClearField(attachment.FieldPurgedAt, field.TypeInt64)
}
if value, ok := _u.mutation.PurgedBy(); ok {
_spec.SetField(attachment.FieldPurgedBy, field.TypeString, value)
}
if _u.mutation.PurgedByCleared() {
_spec.ClearField(attachment.FieldPurgedBy, field.TypeString)
}
if value, ok := _u.mutation.CreatedAt(); ok {
_spec.SetField(attachment.FieldCreatedAt, field.TypeInt64, value)
}
@@ -751,6 +839,73 @@ func (_u *AttachmentUpdateOne) ClearDeletedBy() *AttachmentUpdateOne {
return _u
}
// SetDeletedReason sets the "deleted_reason" field.
func (_u *AttachmentUpdateOne) SetDeletedReason(v string) *AttachmentUpdateOne {
_u.mutation.SetDeletedReason(v)
return _u
}
// SetNillableDeletedReason sets the "deleted_reason" field if the given value is not nil.
func (_u *AttachmentUpdateOne) SetNillableDeletedReason(v *string) *AttachmentUpdateOne {
if v != nil {
_u.SetDeletedReason(*v)
}
return _u
}
// ClearDeletedReason clears the value of the "deleted_reason" field.
func (_u *AttachmentUpdateOne) ClearDeletedReason() *AttachmentUpdateOne {
_u.mutation.ClearDeletedReason()
return _u
}
// SetPurgedAt sets the "purged_at" field.
func (_u *AttachmentUpdateOne) SetPurgedAt(v int64) *AttachmentUpdateOne {
_u.mutation.ResetPurgedAt()
_u.mutation.SetPurgedAt(v)
return _u
}
// SetNillablePurgedAt sets the "purged_at" field if the given value is not nil.
func (_u *AttachmentUpdateOne) SetNillablePurgedAt(v *int64) *AttachmentUpdateOne {
if v != nil {
_u.SetPurgedAt(*v)
}
return _u
}
// AddPurgedAt adds value to the "purged_at" field.
func (_u *AttachmentUpdateOne) AddPurgedAt(v int64) *AttachmentUpdateOne {
_u.mutation.AddPurgedAt(v)
return _u
}
// ClearPurgedAt clears the value of the "purged_at" field.
func (_u *AttachmentUpdateOne) ClearPurgedAt() *AttachmentUpdateOne {
_u.mutation.ClearPurgedAt()
return _u
}
// SetPurgedBy sets the "purged_by" field.
func (_u *AttachmentUpdateOne) SetPurgedBy(v string) *AttachmentUpdateOne {
_u.mutation.SetPurgedBy(v)
return _u
}
// SetNillablePurgedBy sets the "purged_by" field if the given value is not nil.
func (_u *AttachmentUpdateOne) SetNillablePurgedBy(v *string) *AttachmentUpdateOne {
if v != nil {
_u.SetPurgedBy(*v)
}
return _u
}
// ClearPurgedBy clears the value of the "purged_by" field.
func (_u *AttachmentUpdateOne) ClearPurgedBy() *AttachmentUpdateOne {
_u.mutation.ClearPurgedBy()
return _u
}
// SetCreatedAt sets the "created_at" field.
func (_u *AttachmentUpdateOne) SetCreatedAt(v int64) *AttachmentUpdateOne {
_u.mutation.ResetCreatedAt()
@@ -921,6 +1076,27 @@ func (_u *AttachmentUpdateOne) sqlSave(ctx context.Context) (_node *Attachment,
if _u.mutation.DeletedByCleared() {
_spec.ClearField(attachment.FieldDeletedBy, field.TypeString)
}
if value, ok := _u.mutation.DeletedReason(); ok {
_spec.SetField(attachment.FieldDeletedReason, field.TypeString, value)
}
if _u.mutation.DeletedReasonCleared() {
_spec.ClearField(attachment.FieldDeletedReason, field.TypeString)
}
if value, ok := _u.mutation.PurgedAt(); ok {
_spec.SetField(attachment.FieldPurgedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.AddedPurgedAt(); ok {
_spec.AddField(attachment.FieldPurgedAt, field.TypeInt64, value)
}
if _u.mutation.PurgedAtCleared() {
_spec.ClearField(attachment.FieldPurgedAt, field.TypeInt64)
}
if value, ok := _u.mutation.PurgedBy(); ok {
_spec.SetField(attachment.FieldPurgedBy, field.TypeString, value)
}
if _u.mutation.PurgedByCleared() {
_spec.ClearField(attachment.FieldPurgedBy, field.TypeString)
}
if value, ok := _u.mutation.CreatedAt(); ok {
_spec.SetField(attachment.FieldCreatedAt, field.TypeInt64, value)
}