import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common';
import { CreateOvertimeDto } from './dto/create-overtime.dto';
import { UpdateOvertimeDto } from './dto/update-overtime.dto';
import { OvertimeService } from './overtime.service';

@Controller('overtime')
export class OvertimeController {
  constructor(private readonly overtimeService: OvertimeService) {}

  @Get()
  findAll() {
    return this.overtimeService.findAll();
  }

  @Post()
  create(@Body() dto: CreateOvertimeDto) {
    return this.overtimeService.create(dto);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() dto: UpdateOvertimeDto) {
    return this.overtimeService.update(id, dto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.overtimeService.remove(id);
  }
}
