Change category field of publication entity to its id.
This commit is contained in:
@@ -14,8 +14,8 @@ public record PublicationDto(
|
||||
String description,
|
||||
ZonedDateTime creationDate,
|
||||
UUID illustrationId,
|
||||
AuthorDto author,
|
||||
CategoryDto category
|
||||
UUID categoryId,
|
||||
AuthorDto author
|
||||
) {
|
||||
public PublicationDto(Publication publication) {
|
||||
this(
|
||||
@@ -26,8 +26,8 @@ public record PublicationDto(
|
||||
publication.description(),
|
||||
publication.creationDate(),
|
||||
publication.illustrationId(),
|
||||
new AuthorDto(publication.author()),
|
||||
new CategoryDto(publication.category())
|
||||
publication.categoryId(),
|
||||
new AuthorDto(publication.author())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user