package com.example.petstoremobile.api;

import com.example.petstoremobile.dtos.AdoptionDTO;
import com.example.petstoremobile.dtos.BulkDeleteRequest;
import com.example.petstoremobile.dtos.PageResponse;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.HTTP;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface AdoptionApi {

    @GET("api/v1/adoptions")
    Call<PageResponse<AdoptionDTO>> getAllAdoptions(
            @Query("page") int page,
            @Query("size") int size,
            @Query("q") String query,
            @Query("status") String status,
            @Query("storeId") Long storeId,
            @Query("date") String date,
            @Query("employeeId") Long employeeId,
            @Query("sort") String sort);

    @GET("api/v1/adoptions/{id}")
    Call<AdoptionDTO> getAdoptionById(@Path("id") Long id);

    @POST("api/v1/adoptions")
    Call<AdoptionDTO> createAdoption(@Body AdoptionDTO adoption);

    @PUT("api/v1/adoptions/{id}")
    Call<AdoptionDTO> updateAdoption(@Path("id") Long id, @Body AdoptionDTO adoption);

    @DELETE("api/v1/adoptions/{id}")
    Call<Void> deleteAdoption(@Path("id") Long id);

    @HTTP(method = "DELETE", path = "api/v1/adoptions", hasBody = true)
    Call<Void> bulkDeleteAdoptions(@Body BulkDeleteRequest request);
}
