package com.cd.detection.domain.zoo.service;

import com.cd.detection.db.core.ZooCoreService;
import com.cd.detection.domain.zoo.dto.ZooDto.AddRequest;
import com.cd.detection.domain.zoo.dto.ZooDto.ModifyRequest;
import com.cd.detection.domain.zoo.dto.ZooDto.SearchListRequest;
import com.cd.detection.domain.zoo.dto.ZooDto.ZooWithAnimalsRes;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class ZooService {
  private final ZooCoreService zooCoreService;

  // 동물원, 동물 조회
  public Page<ZooWithAnimalsRes> getZooWithAnimals(SearchListRequest searchListRequest) {
    return zooCoreService.getZooWithAnimals(searchListRequest);
  }

  // 동물원 저장
  public void saveZoo(AddRequest dto) {
    zooCoreService.saveZoo(dto);
  }

  // 동물원 수정
  public void updateZoo(ModifyRequest dto) {
    zooCoreService.updateZoo(dto);
  }

  // 동물원 삭제
  public void deleteZoo(ModifyRequest dto) {
    zooCoreService.deleteZoo(dto);
  }
}
