added reward text

This commit is contained in:
SlimusMinus
2026-09-10 01:02:03 +03:00
parent f9e9bdf7cb
commit 5b06b420ef
10 changed files with 27 additions and 5 deletions

View File

@@ -14,12 +14,15 @@ import java.util.List;
public interface PostMapper {
@Mapping(source = "category", target = "category", qualifiedByName = "stringToPostCategory")
@Mapping(source = "rewardText", target = "reward")
Post toEntity(PostRequest request);
@Mapping(source = "user.id", target = "userId")
@Mapping(source = "user.login", target = "userEmail")
@Mapping(source = "images", target = "images", qualifiedByName = "imagesToUrls")
@Mapping(target = "category", expression = "java(post.getCategory().getDisplayName())")
@Mapping(source = "isReward", target = "reward")
@Mapping(source = "reward", target = "rewardText")
PostResponse toResponse(Post post);
@Named("imagesToUrls")