-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
backend/share/src/main/java/com/ssafy/share/api/mapper/ShareBoardMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.ssafy.share.api.mapper; | ||
|
||
|
||
import com.ssafy.share.api.request.ShareBoardWriteRequest; | ||
import com.ssafy.share.db.entity.SharePost; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.Mappings; | ||
import org.mapstruct.ReportingPolicy; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.ERROR) | ||
public interface ShareBoardMapper { | ||
ShareBoardMapper INSTANCE = Mappers.getMapper(ShareBoardMapper.class); | ||
|
||
@Mappings({ | ||
@Mapping(target = "thumbnail", ignore = true), | ||
@Mapping(target = "shareImages", ignore = true), | ||
@Mapping(target = "shareIngredients", ignore = true), | ||
@Mapping(target = "member", ignore = true), | ||
@Mapping(target = "locationInfo", ignore = true) | ||
}) | ||
SharePost postWriteRequestToPost(ShareBoardWriteRequest request); | ||
} |
21 changes: 21 additions & 0 deletions
21
backend/share/src/main/java/com/ssafy/share/api/request/ShareBoardWriteRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.ssafy.share.api.request; | ||
|
||
|
||
import com.ssafy.share.db.entity.ShareIngredient; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
import static javax.persistence.GenerationType.IDENTITY; | ||
|
||
@Data | ||
public class ShareBoardWriteRequest { | ||
|
||
private Long memberId; | ||
private Short locationId; | ||
private String title; | ||
private String content; | ||
private List<ShareIngredient> shareIngredients; | ||
private List<String> shareImages; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
backend/share/src/main/java/com/ssafy/share/db/repository/ShareBoardRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.ssafy.share.db.repository; | ||
|
||
import com.ssafy.share.db.entity.SharePost; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ShareBoardRepository extends JpaRepository<SharePost,Long> { | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
backend/share/src/main/java/com/ssafy/share/service/ShareBoardService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.ssafy.share.service; | ||
|
||
public interface ShareBoardService { | ||
} |
9 changes: 9 additions & 0 deletions
9
backend/share/src/main/java/com/ssafy/share/service/ShareBoardServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.ssafy.share.service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class ShareBoardServiceImpl { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
server: | ||
port: 8080 | ||
|
||
spring: | ||
config: | ||
import: env.yml | ||
|