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();
|
||||
}
|
||||
|
||||
withSoftDeleted() {
|
||||
this.context().withSoftDeleted = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
restore() {
|
||||
return this.patch({
|
||||
[DELETED_COLUMN_NAME]: null,
|
||||
|
Reference in New Issue
Block a user