import { Body, Controller, Get, Param, Patch, Post, UseGuards } from '@nestjs/common'; import { ManageFeeService } from './manage-fee.service'; import { ApiTags } from '@nestjs/swagger'; import { JwtAuthGuard } from 'src/guards/jwt-auth.guard'; import { RolesGuard } from 'src/guards/roles.guard'; import { Roles } from 'src/decorators/roles.decorator'; import { CreateBasicFeeDTO, CreateBondRateDTO, CreateCargoRateDTO, CreateCfFeeDTO, CreateCsFeeDTO, CreateEfFeeDTO, CreateFeeCommDTO, GetFeeGeneralDTO, UpdateBasicFeeDTO, UpdateBondRateDTO, UpdateCargoRateDTO, UpdateCfFeeDTO, UpdateCsFeeDTO, UpdateEfFeeDTO, UpdateFeeCommDTO } from 'src/dto/property.dto'; @ApiTags('Manage Fee - PG') @UseGuards(JwtAuthGuard, RolesGuard) @Roles('psa', 'pua') @Controller('2') export class ManageFeeController { constructor(private readonly manageFeeService: ManageFeeService) { } @Get('/GetBasicFeeRates/:P_SPID/:P_ACTIVE_INACTIVE') GETBASICFEERATES(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETBASICFEERATES(body); } @Post('/CreateBasicFee') CREATEBASICFEE(@Body() body: CreateBasicFeeDTO) { return this.manageFeeService.CREATEBASICFEE(body); } @Patch('/UpdateBasicFee') UPDATEBASICFEE(@Body() body: UpdateBasicFeeDTO) { return this.manageFeeService.UPDATEBASICFEE(body); } // bond rate @Get('/GetBondRates/:P_SPID/:P_ACTIVE_INACTIVE') GETBONDRATES(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETBONDRATES(body); } @Post('/CreateBondRate') CREATEBONDRATE(@Body() body: CreateBondRateDTO) { return this.manageFeeService.CREATEBONDRATE(body); } @Patch('/UpdateBondRate') UPDATEBONDRATE(@Body() body: UpdateBondRateDTO) { return this.manageFeeService.UPDATEBONDRATE(body); } // cargo rate @Get('/GetCargoRates/:P_SPID/:P_ACTIVE_INACTIVE') GETCARGORATES(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETCARGORATES(body); } @Post('/CreateCargoRate') CREATECARGORATE(@Body() body: CreateCargoRateDTO) { return this.manageFeeService.CREATECARGORATE(body); } @Patch('/UpdateCargoRate') UPDATECARGORATE(@Body() body: UpdateCargoRateDTO) { return this.manageFeeService.UPDATECARGORATE(body); } // cf fee rate @Get('/GetCfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE') GETCFFEERATES(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETCFFEERATES(body); } @Post('/CreateCfFee') CREATECFFEE(@Body() body: CreateCfFeeDTO) { return this.manageFeeService.CREATECFFEE(body); } @Patch('/UpdateCfFee') UPDATECFFEE(@Body() body: UpdateCfFeeDTO) { return this.manageFeeService.UPDATECFFEE(body); } // cs fee rate @Get('/GetCsFeeRates/:P_SPID/:P_ACTIVE_INACTIVE') GETCSFEERATES(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETCSFEERATES(body); } @Post('/CreateCsFee') CREATECSFEE(@Body() body: CreateCsFeeDTO) { return this.manageFeeService.CREATECSFEE(body); } @Patch('/UpdateCsFee') UPDATECSFEE(@Body() body: UpdateCsFeeDTO) { return this.manageFeeService.UPDATECSFEE(body); } // ef fee rate @Get('/GetEfFeeRates/:P_SPID/:P_ACTIVE_INACTIVE') GETEFFEERATES(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETEFFEERATES(body); } @Post('/CreateEfFee') CREATEEFFEE(@Body() body: CreateEfFeeDTO) { return this.manageFeeService.CREATEEFFEE(body); } @Patch('/UpdateEfFee') UPDATEEFFEE(@Body() body: UpdateEfFeeDTO) { return this.manageFeeService.UPDATEEFFEE(body); } // fee comm @Get('/GetFeeComm/:P_SPID/:P_ACTIVE_INACTIVE') GETFEECOMM(@Param() body: GetFeeGeneralDTO) { return this.manageFeeService.GETFEECOMM(body); } @Post('/CreateFeeComm') CREATEFEECOMM(@Body() body: CreateFeeCommDTO) { return this.manageFeeService.CREATEFEECOMM(body); } @Patch('/UpdateFeeComm') UPDATEFEECOMM(@Body() body: UpdateFeeCommDTO) { return this.manageFeeService.UPDATEFEECOMM(body); } }