refactor: include full detail when get by id

This commit is contained in:
Methapon Metanipat 2024-09-30 09:17:49 +07:00
parent 9ad9dd2c72
commit 5ccd8909d5

View file

@ -220,7 +220,12 @@ export class QuotationController extends Controller {
async getQuotationById(@Path() quotationId: string) {
const record = await prisma.quotation.findUnique({
include: {
worker: true,
_count: {
select: { worker: true },
},
worker: {
include: { employee: true },
},
service: {
include: {
_count: { select: { work: true } },