feat: setup router report

pull/7/head
Firman Ramdhani 2024-07-02 17:09:07 +07:00
parent e51e5a51a1
commit f62dc15075
10 changed files with 118 additions and 6 deletions

View File

@ -12,4 +12,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',
}

View File

@ -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;
}
}

View File

@ -1,8 +1,10 @@
import { Module } from '@nestjs/common';
import { ReportBookmarkController } from './report-bookmark.controller';
import { ReportBookmarkService } from './report-bookmark.service';
@Module({
imports: [],
controllers: [],
providers: [],
controllers: [ReportBookmarkController],
providers: [ReportBookmarkService],
})
export class ReportBookmarkModule {}

View File

@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class ReportBookmarkService {}

View File

@ -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;
}
}

View File

@ -1,8 +1,10 @@
import { Module } from '@nestjs/common';
import { ReportExportController } from './report-export.controller';
import { ReportExportService } from './report-export.service';
@Module({
imports: [],
controllers: [],
providers: [],
controllers: [ReportExportController],
providers: [ReportExportService],
})
export class ReportExportModule {}

View File

@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class ReportExportService {}

View File

@ -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;
}
}

View File

@ -1,8 +1,10 @@
import { Module } from '@nestjs/common';
import { ReportController } from './report.controller';
import { ReportService } from './report.service';
@Module({
imports: [],
controllers: [],
providers: [],
controllers: [ReportController],
providers: [ReportService],
})
export class ReportModule {}

View File

@ -0,0 +1,4 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class ReportService {}