feat: add user relation on query
This commit is contained in:
parent
2bd30b735d
commit
9f3b8cd290
14 changed files with 259 additions and 41 deletions
|
|
@ -174,6 +174,8 @@ export class CustomerController extends Controller {
|
|||
},
|
||||
}
|
||||
: undefined,
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
orderBy: [{ statusOrder: "asc" }, { createdAt: "asc" }],
|
||||
where,
|
||||
|
|
@ -211,6 +213,8 @@ export class CustomerController extends Controller {
|
|||
subDistrict: true,
|
||||
},
|
||||
},
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
where: { id: customerId },
|
||||
});
|
||||
|
|
@ -293,6 +297,8 @@ export class CustomerController extends Controller {
|
|||
subDistrict: true,
|
||||
},
|
||||
},
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
data: {
|
||||
...payload,
|
||||
|
|
@ -417,6 +423,8 @@ export class CustomerController extends Controller {
|
|||
subDistrict: true,
|
||||
},
|
||||
},
|
||||
createdBy: true,
|
||||
updatedBy: true,
|
||||
},
|
||||
where: { id: customerId },
|
||||
data: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue