feat: add user relation on query

This commit is contained in:
Methapon2001 2024-07-01 14:38:07 +07:00
parent 2bd30b735d
commit 9f3b8cd290
14 changed files with 259 additions and 41 deletions

View file

@ -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: {