package com.caliverse.admin.domain.api;

import com.caliverse.admin.domain.request.BlackListRequest;
import com.caliverse.admin.domain.request.ItemsRequest;
import com.caliverse.admin.domain.response.BlackListResponse;
import com.caliverse.admin.domain.response.ItemDeleteResponse;
import com.caliverse.admin.domain.response.ItemsResponse;
import com.caliverse.admin.domain.service.ItemsService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Tag(name = "아이템조회", description = "아이템조회 api")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/items")
public class ItemsController {
    private final ItemsService itemsService;

    @PostMapping("/list")
    public ResponseEntity<ItemsResponse> findItems(
            @RequestBody ItemsRequest itemRequest){
        return ResponseEntity.ok().body( itemsService.findItems(itemRequest));
    }

    @DeleteMapping("/delete")
    public ResponseEntity<ItemDeleteResponse> postItemDelete(
            @RequestBody ItemsRequest ItemDeleteRequest){
        return ResponseEntity.ok().body( itemsService.postItemDelete(ItemDeleteRequest));
    }


}
