package com.ikon.projectmanagement.api;

import com.ikon.projectmanagement.dto.request.GradeRequestDto;
import com.ikon.projectmanagement.dto.response.GradeResponseDto;
import java.util.List;
import java.util.UUID;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "Grade APIs", description = "APIs for managing local grades")
@RequestMapping("/api/v1/grades")
public interface GradeApi {

    @Operation(summary = "Get all grades")
    @GetMapping
    ResponseEntity<List<GradeResponseDto>> getAllGrades();

    @Operation(summary = "Get grade by ID")
    @GetMapping("/{id}")
    ResponseEntity<GradeResponseDto> getGradeById(@PathVariable UUID id);

    @Operation(summary = "Create a new grade")
    @PostMapping
    @ResponseStatus(HttpStatus.CREATED)
    ResponseEntity<GradeResponseDto> createGrade(@RequestBody GradeRequestDto dto);

    @Operation(summary = "Update an existing grade")
    @PutMapping("/{id}")
    ResponseEntity<GradeResponseDto> updateGrade(@PathVariable UUID id, @RequestBody GradeRequestDto dto);

    @Operation(summary = "Delete a grade")
    @DeleteMapping("/{id}")
    @ResponseStatus(HttpStatus.NO_CONTENT)
    ResponseEntity<Void> deleteGrade(@PathVariable UUID id);
}
