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

import lombok.Getter;
import lombok.Setter;
import ru.kayashov.bar.model.entity.BarEntity;

@Getter
@Setter
public class BarResponseDto {
    private Long id;
    private String name;
    private Boolean active;

    public static BarResponseDto mapToDto(BarEntity barEntity) {
        BarResponseDto barResponseDto = new BarResponseDto();
        barResponseDto.setId(barEntity.getId());
        barResponseDto.setName(barEntity.getName());
        barResponseDto.setActive(barEntity.getActive());
        return barResponseDto;
    }
}
