feat: add user relation on query
This commit is contained in:
parent
2bd30b735d
commit
9f3b8cd290
14 changed files with 259 additions and 41 deletions
|
|
@ -173,6 +173,8 @@ export class BranchController extends Controller {
|
|||
subDistrict: true,
|
||||
},
|
||||
},
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
where,
|
||||
take: pageSize,
|
||||
|
|
@ -195,6 +197,8 @@ export class BranchController extends Controller {
|
|||
province: true,
|
||||
district: true,
|
||||
subDistrict: true,
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
branch: includeSubBranch && {
|
||||
include: {
|
||||
province: true,
|
||||
|
|
@ -276,6 +280,8 @@ export class BranchController extends Controller {
|
|||
province: true,
|
||||
district: true,
|
||||
subDistrict: true,
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
data: {
|
||||
...rest,
|
||||
|
|
@ -442,6 +448,8 @@ export class BranchController extends Controller {
|
|||
province: true,
|
||||
district: true,
|
||||
subDistrict: true,
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
where: { id: branchId },
|
||||
});
|
||||
|
|
@ -466,6 +474,8 @@ export class BranchController extends Controller {
|
|||
province: true,
|
||||
district: true,
|
||||
subDistrict: true,
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
where: { id: branchId },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue