Skip to content

Commit

Permalink
Merge pull request #185 from Team-Smeme/sohyeon_#184
Browse files Browse the repository at this point in the history
[DELETE] 첨삭 기능 삭제
  • Loading branch information
thguss authored Jan 16, 2024
2 parents a3c3251 + 62a2c5b commit a48a4a5
Show file tree
Hide file tree
Showing 19 changed files with 5 additions and 562 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 1 addition & 14 deletions src/main/java/com/smeme/server/dto/diary/DiaryResponseDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import java.util.List;

import com.smeme.server.model.Correction;
import com.smeme.server.model.Diary;

import lombok.AccessLevel;
Expand All @@ -17,8 +16,7 @@ public record DiaryResponseDTO(
String topic,
String content,
String createdAt,
String username,
List<CorrectionDTO> corrections
String username
) {
public static DiaryResponseDTO of(Diary diary) {
return DiaryResponseDTO.builder()
Expand All @@ -27,19 +25,8 @@ public static DiaryResponseDTO of(Diary diary) {
.content(diary.getContent())
.createdAt(dateToString(diary.getCreatedAt()))
.username(diary.getMember().getUsername())
.corrections(diary.getCorrections().stream().map(CorrectionDTO::of).toList())
.build();
}

public record CorrectionDTO(
Long correctionId,
String before,
String after
) {
static CorrectionDTO of(Correction correction) {
return new CorrectionDTO(correction.getId(), correction.getBeforeSentence(), correction.getAfterSentence());
}
}

}

53 changes: 0 additions & 53 deletions src/main/java/com/smeme/server/model/Correction.java

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/java/com/smeme/server/model/Diary.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public class Diary extends BaseTimeEntity {
@JoinColumn(name = "member_id")
private Member member;

@OneToMany(mappedBy = "diary")
private final List<Correction> corrections = new ArrayList<>();

@Builder
public Diary(String content, Topic topic, Member member) {
this.content = content;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import java.util.List;

public interface DiaryRepository extends JpaRepository<Diary, Long>, DiaryCustomRepository {
public interface DiaryRepository extends JpaRepository<Diary, Long> {

void deleteAllByMember(Member member);

Expand Down

This file was deleted.

82 changes: 0 additions & 82 deletions src/main/java/com/smeme/server/service/CorrectionService.java

This file was deleted.

Loading

0 comments on commit a48a4a5

Please sign in to comment.