diff --git a/src/app.module.ts b/src/app.module.ts index ecb975e..a4c0ab6 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -48,6 +48,12 @@ import { TransactionItemModel } from './modules/transaction/transaction/data/mod import { TransactionTaxModel } from './modules/transaction/transaction/data/models/transaction-tax.model'; import { ReconciliationModule } from './modules/transaction/reconciliation/reconciliation.module'; +import { ReportModule } from './modules/reports/report/report.module'; +import { ReportBookmarkModule } from './modules/reports/report-bookmark/report-bookmark.module'; +import { ReportExportModule } from './modules/reports/report-export/report-export.module'; +import { ReportBookmarkModel } from './modules/reports/shared/models/report-bookmark.model'; +import { ExportReportHistoryModel } from './modules/reports/shared/models/export-report-history.model'; + @Module({ imports: [ ApmModule.register(), @@ -80,6 +86,10 @@ import { ReconciliationModule } from './modules/transaction/reconciliation/recon UserModel, VipCategoryModel, VipCodeModel, + + // report + ReportBookmarkModel, + ExportReportHistoryModel, ], synchronize: false, }), @@ -114,6 +124,11 @@ import { ReconciliationModule } from './modules/transaction/reconciliation/recon // session SeasonTypeModule, SeasonPeriodModule, + + // report + ReportModule, + ReportBookmarkModule, + ReportExportModule, ], controllers: [], providers: [ diff --git a/src/core/strings/constants/module.constants.ts b/src/core/strings/constants/module.constants.ts index 77e6def..daf358b 100644 --- a/src/core/strings/constants/module.constants.ts +++ b/src/core/strings/constants/module.constants.ts @@ -14,4 +14,8 @@ export enum MODULE_NAME { USER_PRIVILEGE_CONFIGURATION = 'user-privilege-configurations', VIP_CATEGORY = 'vip-categories', VIP_CODE = 'vip-codes', + + REPORT = 'report', + REPORT_BOOKMARK = 'report-bookmark', + REPORT_EXPORT = 'report-export', } diff --git a/src/modules/reports/report-bookmark/report-bookmark.controller.ts b/src/modules/reports/report-bookmark/report-bookmark.controller.ts new file mode 100644 index 0000000..7f30778 --- /dev/null +++ b/src/modules/reports/report-bookmark/report-bookmark.controller.ts @@ -0,0 +1,35 @@ +import { Controller, Delete, Get, Post, Put } from '@nestjs/common'; +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { Public } from 'src/core/guards'; +import { MODULE_NAME } from 'src/core/strings/constants/module.constants'; + +@ApiTags(`${MODULE_NAME.REPORT_BOOKMARK.split('-').join(' ')}`) +@Controller(`v1/${MODULE_NAME.REPORT_BOOKMARK}`) +@Public(false) +@ApiBearerAuth('JWT') +export class ReportBookmarkController { + @Post() + async create() { + return; + } + + @Get() + async getAll() { + return; + } + + @Put('applied') + async applied() { + return; + } + + @Put('unapplied') + async unapplied() { + return; + } + + @Delete(':id') + async delete() { + return; + } +} diff --git a/src/modules/reports/report-bookmark/report-bookmark.module.ts b/src/modules/reports/report-bookmark/report-bookmark.module.ts new file mode 100644 index 0000000..4a3a2a8 --- /dev/null +++ b/src/modules/reports/report-bookmark/report-bookmark.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { ReportBookmarkController } from './report-bookmark.controller'; +import { ReportBookmarkService } from './report-bookmark.service'; + +@Module({ + imports: [], + controllers: [ReportBookmarkController], + providers: [ReportBookmarkService], +}) +export class ReportBookmarkModule {} diff --git a/src/modules/reports/report-bookmark/report-bookmark.service.ts b/src/modules/reports/report-bookmark/report-bookmark.service.ts new file mode 100644 index 0000000..54923f2 --- /dev/null +++ b/src/modules/reports/report-bookmark/report-bookmark.service.ts @@ -0,0 +1,4 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class ReportBookmarkService {} diff --git a/src/modules/reports/report-export/report-export.controller.ts b/src/modules/reports/report-export/report-export.controller.ts new file mode 100644 index 0000000..ab7b428 --- /dev/null +++ b/src/modules/reports/report-export/report-export.controller.ts @@ -0,0 +1,35 @@ +import { Controller, Delete, Get, Post, Put } from '@nestjs/common'; +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { Public } from 'src/core/guards'; +import { MODULE_NAME } from 'src/core/strings/constants/module.constants'; + +@ApiTags(`${MODULE_NAME.REPORT_EXPORT.split('-').join(' ')}`) +@Controller(`v1/${MODULE_NAME.REPORT_EXPORT}`) +@Public(false) +@ApiBearerAuth('JWT') +export class ReportExportController { + @Post() + async create() { + return; + } + + @Get() + async getAll() { + return; + } + + @Delete(':id') + async delete() { + return; + } + + @Get('processing') + async getAllProcessing() { + return; + } + + @Get('filename-history') + async getListHistoryFileName() { + return; + } +} diff --git a/src/modules/reports/report-export/report-export.module.ts b/src/modules/reports/report-export/report-export.module.ts new file mode 100644 index 0000000..bbd3269 --- /dev/null +++ b/src/modules/reports/report-export/report-export.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { ReportExportController } from './report-export.controller'; +import { ReportExportService } from './report-export.service'; + +@Module({ + imports: [], + controllers: [ReportExportController], + providers: [ReportExportService], +}) +export class ReportExportModule {} diff --git a/src/modules/reports/report-export/report-export.service.ts b/src/modules/reports/report-export/report-export.service.ts new file mode 100644 index 0000000..7af3f29 --- /dev/null +++ b/src/modules/reports/report-export/report-export.service.ts @@ -0,0 +1,4 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class ReportExportService {} diff --git a/src/modules/reports/report/report.controller.ts b/src/modules/reports/report/report.controller.ts new file mode 100644 index 0000000..c420a09 --- /dev/null +++ b/src/modules/reports/report/report.controller.ts @@ -0,0 +1,20 @@ +import { Controller, Get, Post } from '@nestjs/common'; +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; +import { Public } from 'src/core/guards'; +import { MODULE_NAME } from 'src/core/strings/constants/module.constants'; + +@ApiTags(`${MODULE_NAME.REPORT.split('-').join(' ')}`) +@Controller(`v1/${MODULE_NAME.REPORT}`) +@Public(false) +@ApiBearerAuth('JWT') +export class ReportController { + @Get('config') + async getReportConfig() { + return; + } + + @Post('data') + async getReportData() { + return; + } +} diff --git a/src/modules/reports/report/report.module.ts b/src/modules/reports/report/report.module.ts new file mode 100644 index 0000000..b624fe0 --- /dev/null +++ b/src/modules/reports/report/report.module.ts @@ -0,0 +1,10 @@ +import { Module } from '@nestjs/common'; +import { ReportController } from './report.controller'; +import { ReportService } from './report.service'; + +@Module({ + imports: [], + controllers: [ReportController], + providers: [ReportService], +}) +export class ReportModule {} diff --git a/src/modules/reports/report/report.service.ts b/src/modules/reports/report/report.service.ts new file mode 100644 index 0000000..989bd98 --- /dev/null +++ b/src/modules/reports/report/report.service.ts @@ -0,0 +1,4 @@ +import { Injectable } from '@nestjs/common'; + +@Injectable() +export class ReportService {}