feat(manga): add malId to manga details DTO

This commit is contained in:
Rodrigo Verdiani 2025-12-14 16:18:59 -03:00
parent 67a05f34a7
commit d2d2b52898

View File

@ -14,6 +14,7 @@ import java.util.List;
public record MangaDTO( public record MangaDTO(
@NotNull Long id, @NotNull Long id,
@NotNull Long malId,
@NotBlank String title, @NotBlank String title,
String coverImageKey, String coverImageKey,
String status, String status,
@ -32,6 +33,7 @@ public record MangaDTO(
public static MangaDTO from(Manga manga, Boolean favorite, Boolean following) { public static MangaDTO from(Manga manga, Boolean favorite, Boolean following) {
return new MangaDTO( return new MangaDTO(
manga.getId(), manga.getId(),
manga.getMalId(),
manga.getTitle(), manga.getTitle(),
isNull(manga.getCoverImage()) ? null : manga.getCoverImage().getFileKey(), isNull(manga.getCoverImage()) ? null : manga.getCoverImage().getFileKey(),
manga.getStatus(), manga.getStatus(),