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

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;

public class AnimalDto {

  @Getter
  @Setter
  @NoArgsConstructor
  @AllArgsConstructor
  public static class SearchListRequest {
    // 페이징 파라미터
    private int page = 0;
    private int size = 20;

    public Pageable toPageable() {
      return PageRequest.of(page, size);
    }
  }

  @Getter
  @Setter
  public static class AddRequest {

    @Schema(description = "동물원 id")
    private Long zooId;
    @Schema(description = "동물명")
    private String animalName;
    @Schema(description = "종")
    private String species;
    @Schema(description = "나이")
    private Integer age;
  }

  @Getter
  @Setter
  public static class ModifyRequest {

    @Schema(description = "동물 id")
    private Long animalId;
    @Schema(description = "동물명")
    private String animalName;
    @Schema(description = "종")
    private String species;
    @Schema(description = "나이")
    private String age;
    @Schema(description = "삭제여부")
    private Boolean delYn;
    @Schema(description = "사용여부")
    private Boolean useYn;

  }

  @Getter
  @Setter
  public static class Basic {

    @Schema(description = "동물 id")
    private Long animalId;
    @Schema(description = "동물명")
    private String animalName;
    @Schema(description = "종")
    private String species;
    @Schema(description = "나이")
    private String age;
    @Schema(description = "삭제여부")
    private Boolean delYn;
    @Schema(description = "사용여부")
    private Boolean useYn;

  }
}
