Skip to content

Commit

Permalink
[fix] change MenuResponse to include id
Browse files Browse the repository at this point in the history
  • Loading branch information
Parkjyun committed Oct 7, 2024
1 parent 7d63cab commit 9a1c072
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import org.hankki.hankkiserver.domain.menu.model.Menu;

public record MenuResponse(
Long id,
String name,
int price
) {
public static MenuResponse of(Menu menu) {
return new MenuResponse(menu.getName(), menu.getPrice());
return new MenuResponse(menu.getId(), menu.getName(), menu.getPrice());
}
}

0 comments on commit 9a1c072

Please sign in to comment.