56 lines
1.7 KiB
TypeScript
56 lines
1.7 KiB
TypeScript
import { Body, Controller, Get, Patch, Post, Put, Query } from '@nestjs/common';
|
|
import { ApiQuery, ApiTags } from '@nestjs/swagger';
|
|
import { ParamTableService } from './param-table.service';
|
|
|
|
import { ActivateOrInactivateParamRecordDTO, CreateParamRecordDTO, CreateTableRecordDTO,
|
|
getParamValuesDTO, UpdateParamRecordDTO } from 'src/dto/property.dto';
|
|
|
|
@ApiTags('Param Table - Oracle')
|
|
@Controller('oracle')
|
|
export class ParamTableController {
|
|
constructor(private readonly paramTableService: ParamTableService) { }
|
|
|
|
|
|
@Get('/GetParamValues')
|
|
@ApiQuery({
|
|
name: 'P_SPID',
|
|
required: false,
|
|
type: Number,
|
|
description: 'The ID of the parameter',
|
|
})
|
|
@ApiQuery({
|
|
name: 'P_PARAMTYPE',
|
|
required: false,
|
|
type: String,
|
|
description: 'The type of the parameter',
|
|
})
|
|
getParamValues(@Query() body: getParamValuesDTO) {
|
|
return this.paramTableService.GETPARAMVALUES(body);
|
|
}
|
|
|
|
@Post('/CreateTableRecord')
|
|
createTableRecord(@Body() body: CreateTableRecordDTO) {
|
|
return this.paramTableService.CREATETABLERECORD(body);
|
|
}
|
|
|
|
@Post('/CreateParamRecord')
|
|
createParamRecord(@Body() body: CreateParamRecordDTO) {
|
|
return this.paramTableService.CREATEPARAMRECORD(body);
|
|
}
|
|
|
|
@Patch('/UpdateParamRecord')
|
|
UpdateParamRecord(@Body() body: UpdateParamRecordDTO) {
|
|
return this.paramTableService.UPDATEPARAMRECORD(body);
|
|
}
|
|
|
|
@Patch('/InActivateParamRecord')
|
|
inActivateParamRecord(@Body() body: ActivateOrInactivateParamRecordDTO) {
|
|
return this.paramTableService.INACTIVATEPARAMRECORD(body);
|
|
}
|
|
|
|
@Patch('/ReActivateParamRecord')
|
|
reActivateParamRecord(@Body() body: ActivateOrInactivateParamRecordDTO) {
|
|
return this.paramTableService.REACTIVATEPARAMRECORD(body);
|
|
}
|
|
}
|