feat: add withSoftDeleted functionality in base model
This commit is contained in:
@@ -33,6 +33,11 @@ class ExtendedQueryBuilder<M extends Model, R = M[]> extends Model.QueryBuilder<
|
|||||||
return super.delete();
|
return super.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
withSoftDeleted() {
|
||||||
|
this.context().withSoftDeleted = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
restore() {
|
restore() {
|
||||||
return this.patch({
|
return this.patch({
|
||||||
[DELETED_COLUMN_NAME]: null,
|
[DELETED_COLUMN_NAME]: null,
|
||||||
|
Reference in New Issue
Block a user