From 50d02ea9ffdf3c6eb1c003dd6f0a501046a4dea2 Mon Sep 17 00:00:00 2001 From: Supan Adit Pratama Date: Sat, 2 Nov 2024 01:07:19 +0700 Subject: [PATCH] wip: separate some controller interface to be fine grain later --- .../skeleton-crud.controller.interface.ts | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts b/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts index 0e448a8..fa4fb85 100644 --- a/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts +++ b/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts @@ -1,10 +1,23 @@ import { IPaginationParam } from '../pagination-param.interface'; -export interface ISkeletonCRUDController { - create(body); - delete(id); +export interface ISkeletonReadController { list(); - pagination(params: IPaginationParam); read(id); + pagination(params: IPaginationParam); +} + +export interface ISkeletonDeleteController { + delete(id); +} +export interface ISkeletonCreateController { + create(body); +} +export interface ISkeletonUpdateController { update(id, body); } + +export interface ISkeletonCRUDController + extends ISkeletonCreateController, + ISkeletonReadController, + ISkeletonDeleteController, + ISkeletonUpdateController {}