diff --git a/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts b/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts new file mode 100644 index 0000000..6c3e672 --- /dev/null +++ b/libs/skeleton/src/interfaces/controller/skeleton-crud.controller.interface.ts @@ -0,0 +1,12 @@ +export interface ISkeletonCRUDController { + create(); + readSelected(id); + readPagination(); + readEntire(); + updatePartial(); + updatePartialBatch(); + updateEntire(); + updateEntirePatch(); + deleteSelected(); + deleteBatch(); +} diff --git a/libs/skeleton/src/interfaces/skeleton-process.interface.ts b/libs/skeleton/src/interfaces/skeleton-process.interface.ts new file mode 100644 index 0000000..a9727c9 --- /dev/null +++ b/libs/skeleton/src/interfaces/skeleton-process.interface.ts @@ -0,0 +1,10 @@ +export interface StandardProcess { + initialization(): void; + before(): void; + begin(): void; + process(): void; + end(): void; + after(): void; + + result(); +} diff --git a/libs/skeleton/src/interfaces/standard-process.interface.ts b/libs/skeleton/src/interfaces/standard-process.interface.ts deleted file mode 100644 index 71cfd4a..0000000 --- a/libs/skeleton/src/interfaces/standard-process.interface.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface StandardProcess { - Initialization(): void; - Before(): void; - Begin(): void; - Process(): void; - End(): void; - After(): void; -} diff --git a/libs/skeleton/src/skeleton-crud.controller.ts b/libs/skeleton/src/skeleton-crud.controller.ts index 2ab0cac..af90e2a 100644 --- a/libs/skeleton/src/skeleton-crud.controller.ts +++ b/libs/skeleton/src/skeleton-crud.controller.ts @@ -1,11 +1,12 @@ import { Delete, Get, Param, Patch, Post, Put } from '@nestjs/common'; +import { ISkeletonCRUDController } from './interfaces/controller/skeleton-crud.controller.interface'; -export class SkeletonCRUDController { +export class SkeletonCRUDController implements ISkeletonCRUDController { @Post() create() {} @Get(':id') - readSelected(@Param('id') id: string) {} + readSelected(@Param('id') id) {} @Get() readPagination() {}