From c27620c2b5a3b96ee11e6195376e686be8b4212a Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 3 Oct 2024 14:30:35 +0700 Subject: [PATCH] feat: add count by relation --- src/controllers/05-quotation-controller.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index 6a5d700..a3bd597 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -183,6 +183,9 @@ export class QuotationController extends Controller { prisma.quotation.findMany({ where, include: { + _count: { + select: { worker: true }, + }, customerBranch: true, paySplit: true, },