feat: 完成附件存储重构与磁盘监控功能,同步物料档案与入库单规则更新
1. 新增跨平台磁盘空间监控能力,每日7点自动检测附件目录剩余空间,触发阈值告警 2. 重构附件存储方案为年/月/日/文件类型分层结构,统一MES与WMS的附件管理逻辑 3. 对齐物料档案与入库单的质量状态校验规则,仅合格品计入库存与出库 4. 实现入库单作废功能与区域库位的多级父子结构管理 5. 删除物料简称字段,补充规格型号与单位必填项,统一系统数据口径 6. 新增附件中心与磁盘状态查询接口,完善权限控制与操作日志
This commit is contained in:
@@ -45,6 +45,48 @@ func (_c *AttachmentCreate) SetFilePath(v string) *AttachmentCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetFileType sets the "file_type" field.
|
||||
func (_c *AttachmentCreate) SetFileType(v string) *AttachmentCreate {
|
||||
_c.mutation.SetFileType(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableFileType sets the "file_type" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableFileType(v *string) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetFileType(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetFileExt sets the "file_ext" field.
|
||||
func (_c *AttachmentCreate) SetFileExt(v string) *AttachmentCreate {
|
||||
_c.mutation.SetFileExt(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableFileExt sets the "file_ext" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableFileExt(v *string) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetFileExt(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetFileMd5 sets the "file_md5" field.
|
||||
func (_c *AttachmentCreate) SetFileMd5(v string) *AttachmentCreate {
|
||||
_c.mutation.SetFileMd5(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableFileMd5 sets the "file_md5" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableFileMd5(v *string) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetFileMd5(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetFileSize sets the "file_size" field.
|
||||
func (_c *AttachmentCreate) SetFileSize(v int64) *AttachmentCreate {
|
||||
_c.mutation.SetFileSize(v)
|
||||
@@ -87,6 +129,76 @@ func (_c *AttachmentCreate) SetNillableUploadedBy(v *string) *AttachmentCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetArchived sets the "archived" field.
|
||||
func (_c *AttachmentCreate) SetArchived(v bool) *AttachmentCreate {
|
||||
_c.mutation.SetArchived(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableArchived sets the "archived" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableArchived(v *bool) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetArchived(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetArchivedAt sets the "archived_at" field.
|
||||
func (_c *AttachmentCreate) SetArchivedAt(v int64) *AttachmentCreate {
|
||||
_c.mutation.SetArchivedAt(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableArchivedAt sets the "archived_at" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableArchivedAt(v *int64) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetArchivedAt(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetDeleted sets the "deleted" field.
|
||||
func (_c *AttachmentCreate) SetDeleted(v bool) *AttachmentCreate {
|
||||
_c.mutation.SetDeleted(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableDeleted sets the "deleted" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableDeleted(v *bool) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetDeleted(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetDeletedAt sets the "deleted_at" field.
|
||||
func (_c *AttachmentCreate) SetDeletedAt(v int64) *AttachmentCreate {
|
||||
_c.mutation.SetDeletedAt(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableDeletedAt(v *int64) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetDeletedAt(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetDeletedBy sets the "deleted_by" field.
|
||||
func (_c *AttachmentCreate) SetDeletedBy(v string) *AttachmentCreate {
|
||||
_c.mutation.SetDeletedBy(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableDeletedBy sets the "deleted_by" field if the given value is not nil.
|
||||
func (_c *AttachmentCreate) SetNillableDeletedBy(v *string) *AttachmentCreate {
|
||||
if v != nil {
|
||||
_c.SetDeletedBy(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_c *AttachmentCreate) SetCreatedAt(v int64) *AttachmentCreate {
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -140,6 +252,14 @@ func (_c *AttachmentCreate) defaults() {
|
||||
v := attachment.DefaultFileSize
|
||||
_c.mutation.SetFileSize(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Archived(); !ok {
|
||||
v := attachment.DefaultArchived
|
||||
_c.mutation.SetArchived(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Deleted(); !ok {
|
||||
v := attachment.DefaultDeleted
|
||||
_c.mutation.SetDeleted(v)
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
v := attachment.DefaultCreatedAt()
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -163,6 +283,12 @@ func (_c *AttachmentCreate) check() error {
|
||||
if _, ok := _c.mutation.FileSize(); !ok {
|
||||
return &ValidationError{Name: "file_size", err: errors.New(`ent: missing required field "Attachment.file_size"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.Archived(); !ok {
|
||||
return &ValidationError{Name: "archived", err: errors.New(`ent: missing required field "Attachment.archived"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.Deleted(); !ok {
|
||||
return &ValidationError{Name: "deleted", err: errors.New(`ent: missing required field "Attachment.deleted"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Attachment.created_at"`)}
|
||||
}
|
||||
@@ -209,6 +335,18 @@ func (_c *AttachmentCreate) createSpec() (*Attachment, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(attachment.FieldFilePath, field.TypeString, value)
|
||||
_node.FilePath = value
|
||||
}
|
||||
if value, ok := _c.mutation.FileType(); ok {
|
||||
_spec.SetField(attachment.FieldFileType, field.TypeString, value)
|
||||
_node.FileType = value
|
||||
}
|
||||
if value, ok := _c.mutation.FileExt(); ok {
|
||||
_spec.SetField(attachment.FieldFileExt, field.TypeString, value)
|
||||
_node.FileExt = value
|
||||
}
|
||||
if value, ok := _c.mutation.FileMd5(); ok {
|
||||
_spec.SetField(attachment.FieldFileMd5, field.TypeString, value)
|
||||
_node.FileMd5 = value
|
||||
}
|
||||
if value, ok := _c.mutation.FileSize(); ok {
|
||||
_spec.SetField(attachment.FieldFileSize, field.TypeInt64, value)
|
||||
_node.FileSize = value
|
||||
@@ -221,6 +359,26 @@ func (_c *AttachmentCreate) createSpec() (*Attachment, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(attachment.FieldUploadedBy, field.TypeString, value)
|
||||
_node.UploadedBy = value
|
||||
}
|
||||
if value, ok := _c.mutation.Archived(); ok {
|
||||
_spec.SetField(attachment.FieldArchived, field.TypeBool, value)
|
||||
_node.Archived = value
|
||||
}
|
||||
if value, ok := _c.mutation.ArchivedAt(); ok {
|
||||
_spec.SetField(attachment.FieldArchivedAt, field.TypeInt64, value)
|
||||
_node.ArchivedAt = value
|
||||
}
|
||||
if value, ok := _c.mutation.Deleted(); ok {
|
||||
_spec.SetField(attachment.FieldDeleted, field.TypeBool, value)
|
||||
_node.Deleted = value
|
||||
}
|
||||
if value, ok := _c.mutation.DeletedAt(); ok {
|
||||
_spec.SetField(attachment.FieldDeletedAt, field.TypeInt64, value)
|
||||
_node.DeletedAt = value
|
||||
}
|
||||
if value, ok := _c.mutation.DeletedBy(); ok {
|
||||
_spec.SetField(attachment.FieldDeletedBy, field.TypeString, value)
|
||||
_node.DeletedBy = value
|
||||
}
|
||||
if value, ok := _c.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(attachment.FieldCreatedAt, field.TypeInt64, value)
|
||||
_node.CreatedAt = value
|
||||
@@ -325,6 +483,60 @@ func (u *AttachmentUpsert) UpdateFilePath() *AttachmentUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetFileType sets the "file_type" field.
|
||||
func (u *AttachmentUpsert) SetFileType(v string) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldFileType, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateFileType sets the "file_type" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateFileType() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldFileType)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearFileType clears the value of the "file_type" field.
|
||||
func (u *AttachmentUpsert) ClearFileType() *AttachmentUpsert {
|
||||
u.SetNull(attachment.FieldFileType)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetFileExt sets the "file_ext" field.
|
||||
func (u *AttachmentUpsert) SetFileExt(v string) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldFileExt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateFileExt sets the "file_ext" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateFileExt() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldFileExt)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearFileExt clears the value of the "file_ext" field.
|
||||
func (u *AttachmentUpsert) ClearFileExt() *AttachmentUpsert {
|
||||
u.SetNull(attachment.FieldFileExt)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetFileMd5 sets the "file_md5" field.
|
||||
func (u *AttachmentUpsert) SetFileMd5(v string) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldFileMd5, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateFileMd5 sets the "file_md5" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateFileMd5() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldFileMd5)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearFileMd5 clears the value of the "file_md5" field.
|
||||
func (u *AttachmentUpsert) ClearFileMd5() *AttachmentUpsert {
|
||||
u.SetNull(attachment.FieldFileMd5)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetFileSize sets the "file_size" field.
|
||||
func (u *AttachmentUpsert) SetFileSize(v int64) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldFileSize, v)
|
||||
@@ -379,6 +591,96 @@ func (u *AttachmentUpsert) ClearUploadedBy() *AttachmentUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetArchived sets the "archived" field.
|
||||
func (u *AttachmentUpsert) SetArchived(v bool) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldArchived, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateArchived sets the "archived" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateArchived() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldArchived)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetArchivedAt sets the "archived_at" field.
|
||||
func (u *AttachmentUpsert) SetArchivedAt(v int64) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldArchivedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateArchivedAt sets the "archived_at" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateArchivedAt() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldArchivedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// AddArchivedAt adds v to the "archived_at" field.
|
||||
func (u *AttachmentUpsert) AddArchivedAt(v int64) *AttachmentUpsert {
|
||||
u.Add(attachment.FieldArchivedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearArchivedAt clears the value of the "archived_at" field.
|
||||
func (u *AttachmentUpsert) ClearArchivedAt() *AttachmentUpsert {
|
||||
u.SetNull(attachment.FieldArchivedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetDeleted sets the "deleted" field.
|
||||
func (u *AttachmentUpsert) SetDeleted(v bool) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldDeleted, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateDeleted sets the "deleted" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateDeleted() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldDeleted)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetDeletedAt sets the "deleted_at" field.
|
||||
func (u *AttachmentUpsert) SetDeletedAt(v int64) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldDeletedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateDeletedAt() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldDeletedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// AddDeletedAt adds v to the "deleted_at" field.
|
||||
func (u *AttachmentUpsert) AddDeletedAt(v int64) *AttachmentUpsert {
|
||||
u.Add(attachment.FieldDeletedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearDeletedAt clears the value of the "deleted_at" field.
|
||||
func (u *AttachmentUpsert) ClearDeletedAt() *AttachmentUpsert {
|
||||
u.SetNull(attachment.FieldDeletedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetDeletedBy sets the "deleted_by" field.
|
||||
func (u *AttachmentUpsert) SetDeletedBy(v string) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldDeletedBy, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateDeletedBy sets the "deleted_by" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsert) UpdateDeletedBy() *AttachmentUpsert {
|
||||
u.SetExcluded(attachment.FieldDeletedBy)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearDeletedBy clears the value of the "deleted_by" field.
|
||||
func (u *AttachmentUpsert) ClearDeletedBy() *AttachmentUpsert {
|
||||
u.SetNull(attachment.FieldDeletedBy)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *AttachmentUpsert) SetCreatedAt(v int64) *AttachmentUpsert {
|
||||
u.Set(attachment.FieldCreatedAt, v)
|
||||
@@ -493,6 +795,69 @@ func (u *AttachmentUpsertOne) UpdateFilePath() *AttachmentUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileType sets the "file_type" field.
|
||||
func (u *AttachmentUpsertOne) SetFileType(v string) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetFileType(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateFileType sets the "file_type" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateFileType() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateFileType()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearFileType clears the value of the "file_type" field.
|
||||
func (u *AttachmentUpsertOne) ClearFileType() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearFileType()
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileExt sets the "file_ext" field.
|
||||
func (u *AttachmentUpsertOne) SetFileExt(v string) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetFileExt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateFileExt sets the "file_ext" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateFileExt() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateFileExt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearFileExt clears the value of the "file_ext" field.
|
||||
func (u *AttachmentUpsertOne) ClearFileExt() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearFileExt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileMd5 sets the "file_md5" field.
|
||||
func (u *AttachmentUpsertOne) SetFileMd5(v string) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetFileMd5(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateFileMd5 sets the "file_md5" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateFileMd5() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateFileMd5()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearFileMd5 clears the value of the "file_md5" field.
|
||||
func (u *AttachmentUpsertOne) ClearFileMd5() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearFileMd5()
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileSize sets the "file_size" field.
|
||||
func (u *AttachmentUpsertOne) SetFileSize(v int64) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
@@ -556,6 +921,111 @@ func (u *AttachmentUpsertOne) ClearUploadedBy() *AttachmentUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetArchived sets the "archived" field.
|
||||
func (u *AttachmentUpsertOne) SetArchived(v bool) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetArchived(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateArchived sets the "archived" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateArchived() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateArchived()
|
||||
})
|
||||
}
|
||||
|
||||
// SetArchivedAt sets the "archived_at" field.
|
||||
func (u *AttachmentUpsertOne) SetArchivedAt(v int64) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetArchivedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// AddArchivedAt adds v to the "archived_at" field.
|
||||
func (u *AttachmentUpsertOne) AddArchivedAt(v int64) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.AddArchivedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateArchivedAt sets the "archived_at" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateArchivedAt() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateArchivedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearArchivedAt clears the value of the "archived_at" field.
|
||||
func (u *AttachmentUpsertOne) ClearArchivedAt() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearArchivedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDeleted sets the "deleted" field.
|
||||
func (u *AttachmentUpsertOne) SetDeleted(v bool) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetDeleted(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDeleted sets the "deleted" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateDeleted() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateDeleted()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDeletedAt sets the "deleted_at" field.
|
||||
func (u *AttachmentUpsertOne) SetDeletedAt(v int64) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetDeletedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// AddDeletedAt adds v to the "deleted_at" field.
|
||||
func (u *AttachmentUpsertOne) AddDeletedAt(v int64) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.AddDeletedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateDeletedAt() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateDeletedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearDeletedAt clears the value of the "deleted_at" field.
|
||||
func (u *AttachmentUpsertOne) ClearDeletedAt() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearDeletedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDeletedBy sets the "deleted_by" field.
|
||||
func (u *AttachmentUpsertOne) SetDeletedBy(v string) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetDeletedBy(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDeletedBy sets the "deleted_by" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertOne) UpdateDeletedBy() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateDeletedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearDeletedBy clears the value of the "deleted_by" field.
|
||||
func (u *AttachmentUpsertOne) ClearDeletedBy() *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearDeletedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *AttachmentUpsertOne) SetCreatedAt(v int64) *AttachmentUpsertOne {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
@@ -837,6 +1307,69 @@ func (u *AttachmentUpsertBulk) UpdateFilePath() *AttachmentUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileType sets the "file_type" field.
|
||||
func (u *AttachmentUpsertBulk) SetFileType(v string) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetFileType(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateFileType sets the "file_type" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateFileType() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateFileType()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearFileType clears the value of the "file_type" field.
|
||||
func (u *AttachmentUpsertBulk) ClearFileType() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearFileType()
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileExt sets the "file_ext" field.
|
||||
func (u *AttachmentUpsertBulk) SetFileExt(v string) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetFileExt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateFileExt sets the "file_ext" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateFileExt() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateFileExt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearFileExt clears the value of the "file_ext" field.
|
||||
func (u *AttachmentUpsertBulk) ClearFileExt() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearFileExt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileMd5 sets the "file_md5" field.
|
||||
func (u *AttachmentUpsertBulk) SetFileMd5(v string) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetFileMd5(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateFileMd5 sets the "file_md5" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateFileMd5() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateFileMd5()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearFileMd5 clears the value of the "file_md5" field.
|
||||
func (u *AttachmentUpsertBulk) ClearFileMd5() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearFileMd5()
|
||||
})
|
||||
}
|
||||
|
||||
// SetFileSize sets the "file_size" field.
|
||||
func (u *AttachmentUpsertBulk) SetFileSize(v int64) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
@@ -900,6 +1433,111 @@ func (u *AttachmentUpsertBulk) ClearUploadedBy() *AttachmentUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetArchived sets the "archived" field.
|
||||
func (u *AttachmentUpsertBulk) SetArchived(v bool) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetArchived(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateArchived sets the "archived" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateArchived() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateArchived()
|
||||
})
|
||||
}
|
||||
|
||||
// SetArchivedAt sets the "archived_at" field.
|
||||
func (u *AttachmentUpsertBulk) SetArchivedAt(v int64) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetArchivedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// AddArchivedAt adds v to the "archived_at" field.
|
||||
func (u *AttachmentUpsertBulk) AddArchivedAt(v int64) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.AddArchivedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateArchivedAt sets the "archived_at" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateArchivedAt() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateArchivedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearArchivedAt clears the value of the "archived_at" field.
|
||||
func (u *AttachmentUpsertBulk) ClearArchivedAt() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearArchivedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDeleted sets the "deleted" field.
|
||||
func (u *AttachmentUpsertBulk) SetDeleted(v bool) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetDeleted(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDeleted sets the "deleted" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateDeleted() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateDeleted()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDeletedAt sets the "deleted_at" field.
|
||||
func (u *AttachmentUpsertBulk) SetDeletedAt(v int64) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetDeletedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// AddDeletedAt adds v to the "deleted_at" field.
|
||||
func (u *AttachmentUpsertBulk) AddDeletedAt(v int64) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.AddDeletedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateDeletedAt() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateDeletedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearDeletedAt clears the value of the "deleted_at" field.
|
||||
func (u *AttachmentUpsertBulk) ClearDeletedAt() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearDeletedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetDeletedBy sets the "deleted_by" field.
|
||||
func (u *AttachmentUpsertBulk) SetDeletedBy(v string) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.SetDeletedBy(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateDeletedBy sets the "deleted_by" field to the value that was provided on create.
|
||||
func (u *AttachmentUpsertBulk) UpdateDeletedBy() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.UpdateDeletedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearDeletedBy clears the value of the "deleted_by" field.
|
||||
func (u *AttachmentUpsertBulk) ClearDeletedBy() *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
s.ClearDeletedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *AttachmentUpsertBulk) SetCreatedAt(v int64) *AttachmentUpsertBulk {
|
||||
return u.Update(func(s *AttachmentUpsert) {
|
||||
|
||||
Reference in New Issue
Block a user