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

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

@Getter
@Setter
public class CategoryResponseDto {
    private int id;
    private String name;

    public static CategoryResponseDto mapToDto(CategoryEntity entity) {
        CategoryResponseDto dto = new CategoryResponseDto();
        dto.setId(entity.getId());
        dto.setName(entity.getName());
        return dto;
    }
}
