package ru.kayashov.bar.controller.dto.cocktail;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@JsonFormat(shape = JsonFormat.Shape.STRING)
@RequiredArgsConstructor
public enum SortingEnum {
    @JsonProperty("name|asc")
    NAME_ASC("name", true),

    @JsonProperty("name|desc")
    NAME_DESC("name", false),

    @JsonProperty("rating.rating|desc")
    RATING_DESC("rating", false),

    @JsonProperty("rating.rating|asc")
    RATING_ASC("rating" , true),

    @JsonProperty("rating.favourite|desc")
    FAVOURITE_DESC("favourite", false),

    @JsonProperty("rating.favourite|asc")
    FAVOURITE_ASC("favourite", true);

    private final String orderBy;
    private final Boolean isAsc;
}
