import {
  Controller,
  Get,
  Post,
  Body,
  Patch,
  Param,
  Delete,
  Query,
  UseGuards,
} from '@nestjs/common';
import { ApiBearerAuth, ApiConsumes, ApiTags } from '@nestjs/swagger';
import { OperationLogService } from './operation-log.service';
import { CreateOperationLogDto } from './dto/create-operation-log.dto';
import { UpdateOperationLogDto } from './dto/update-operation-log.dto';
import { QueryOperationLogDto } from './dto/query.dto';
import { JwtGuard } from '@/common/guards';

@ApiTags('operation-log')
@ApiBearerAuth('JWT')
@UseGuards(JwtGuard)
@Controller('operation-log')
export class OperationLogController {
  constructor(private readonly operationLogService: OperationLogService) {}

  @Post()
  create(@Body() createOperationLogDto: CreateOperationLogDto) {
    return this.operationLogService.create(createOperationLogDto);
  }

  @Get('page')
  findPagination(@Query() queryDto: QueryOperationLogDto) {
    return this.operationLogService.findPagination(queryDto);
  }

  // @Patch(':id')
  // update(@Param('id') id: string, @Body() updateOperationLogDto: UpdateOperationLogDto) {
  //   return this.operationLogService.update(+id, updateOperationLogDto);
  // }
  // @Delete(':id')
  // remove(@Param('id') id: string) {
  //   return this.operationLogService.remove(+id);
  // }
}
