package ru.kayashov.bar.controller.dto;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import ru.kayashov.bar.controller.dto.cocktail.CocktailSimpleResponseDto;
import ru.kayashov.bar.model.entity.Pay;

@Getter
@Setter
@NoArgsConstructor
public class OrderResponseDto {
    private Long id;
    private CocktailSimpleResponseDto cocktail;
    private VisitorResponseDto visitor;
    private String status;

    public OrderResponseDto(Pay pay) {
        id = pay.getId();
        cocktail = CocktailSimpleResponseDto.mapToDto(pay.getCocktail());
        visitor = VisitorResponseDto.mapToDto(pay.getVisitor());
        status = pay.getStatus().toString();
    }
}
