Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DELETE] 첨삭 기능 삭제 #185

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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
Loading