-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Donut-DONationUTile/feature/report
Feat: 신고 기능 구현
- Loading branch information
Showing
9 changed files
with
108 additions
and
28 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
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
13 changes: 0 additions & 13 deletions
13
src/main/java/zero/eight/donut/dto/report/ReportRequestDto.java
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/main/java/zero/eight/donut/dto/report/ReportedRequestDto.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,23 @@ | ||
package zero.eight.donut.dto.report; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import zero.eight.donut.domain.Gift; | ||
import zero.eight.donut.domain.Giver; | ||
import zero.eight.donut.domain.Receiver; | ||
import zero.eight.donut.domain.Report; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ReportedRequestDto { | ||
private Long giftId; | ||
public Report toEntity(Giver giver, Receiver receiver, Gift gift){ | ||
return Report.builder() | ||
.giver(giver) | ||
.receiver(receiver) | ||
.gift(gift) | ||
.build(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/zero/eight/donut/dto/report/ReportedResponseDto.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,17 @@ | ||
package zero.eight.donut.dto.report; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class ReportedResponseDto { | ||
private Long reportId; | ||
private Long giftId; | ||
private Boolean isLast; | ||
@Builder | ||
public ReportedResponseDto(Long reportId, Long giftId, Boolean isLast){ | ||
this.reportId = reportId; | ||
this.giftId = giftId; | ||
this.isLast=isLast; | ||
} | ||
} |
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
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
7 changes: 7 additions & 0 deletions
7
src/main/java/zero/eight/donut/repository/ReportRepository.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,7 @@ | ||
package zero.eight.donut.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import zero.eight.donut.domain.Report; | ||
|
||
public interface ReportRepository extends JpaRepository<Report, Long> { | ||
} |
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