added reward text
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user