From 6a4484c9cd9499a69666639db0fd29c757930019 Mon Sep 17 00:00:00 2001 From: oosedus Date: Wed, 24 Jul 2024 17:55:14 +0900 Subject: [PATCH 1/2] remove secret file --- .gradle/8.8/checksums/checksums.lock | Bin 0 -> 17 bytes .gradle/8.8/checksums/md5-checksums.bin | Bin 0 -> 20847 bytes .gradle/8.8/checksums/sha1-checksums.bin | Bin 0 -> 23681 bytes .../8.8/dependencies-accessors/gc.properties | 0 .../executionHistory/executionHistory.lock | Bin 0 -> 17 bytes .gradle/8.8/fileChanges/last-build.bin | Bin 0 -> 1 bytes .gradle/8.8/fileHashes/fileHashes.lock | Bin 0 -> 17 bytes .gradle/8.8/gc.properties | 0 .../buildOutputCleanup.lock | Bin 0 -> 17 bytes .gradle/buildOutputCleanup/cache.properties | 2 + .gradle/vcs-1/gc.properties | 0 .../likelion/MZConnent/domain/chat/Chat.java | 43 +++++++++ .../MZConnent/domain/club/AgeRestriction.java | 32 +++++++ .../likelion/MZConnent/domain/club/Club.java | 84 ++++++++++++++++++ .../MZConnent/domain/club/ClubMember.java | 43 +++++++++ .../MZConnent/domain/club/ClubRole.java | 27 ++++++ .../domain/club/GenderRestriction.java | 31 +++++++ .../MZConnent/domain/club/RegionCategory.java | 25 ++++++ .../MZConnent/domain/culture/Culture.java | 67 ++++++++++++++ .../domain/culture/CultureCategory.java | 18 ++++ .../domain/culture/CultureInterest.java | 32 +++++++ .../MZConnent/domain/manner/Manner.java | 40 +++++++++ .../MZConnent/domain/review/Review.java | 78 ++++++++++++++++ .../domain/review/ReviewComment.java | 42 +++++++++ .../MZConnent/domain/review/ReviewLike.java | 32 +++++++ .../domain/self/SelfIntroduction.java | 33 +++++++ .../repository/chat/ChatRepository.java | 9 ++ .../repository/club/ClubMemberRepository.java | 9 ++ .../repository/club/ClubRepository.java | 10 +++ .../club/RegionCategoryRepository.java | 10 +++ .../culture/CultureCategoryRepository.java | 9 ++ .../culture/CultureInterestRepository.java | 9 ++ .../repository/culture/CultureRepository.java | 9 ++ .../repository/manner/MannerRepository.java | 9 ++ .../review/ReviewCommentRepository.java | 10 +++ .../review/ReviewLikeRepository.java | 9 ++ .../repository/review/ReviewRepository.java | 9 ++ .../self/SelfIntroductionRepository.java | 10 +++ 38 files changed, 741 insertions(+) create mode 100644 .gradle/8.8/checksums/checksums.lock create mode 100644 .gradle/8.8/checksums/md5-checksums.bin create mode 100644 .gradle/8.8/checksums/sha1-checksums.bin create mode 100644 .gradle/8.8/dependencies-accessors/gc.properties create mode 100644 .gradle/8.8/executionHistory/executionHistory.lock create mode 100644 .gradle/8.8/fileChanges/last-build.bin create mode 100644 .gradle/8.8/fileHashes/fileHashes.lock create mode 100644 .gradle/8.8/gc.properties create mode 100644 .gradle/buildOutputCleanup/buildOutputCleanup.lock create mode 100644 .gradle/buildOutputCleanup/cache.properties create mode 100644 .gradle/vcs-1/gc.properties create mode 100644 src/main/java/likelion/MZConnent/domain/chat/Chat.java create mode 100644 src/main/java/likelion/MZConnent/domain/club/AgeRestriction.java create mode 100644 src/main/java/likelion/MZConnent/domain/club/Club.java create mode 100644 src/main/java/likelion/MZConnent/domain/club/ClubMember.java create mode 100644 src/main/java/likelion/MZConnent/domain/club/ClubRole.java create mode 100644 src/main/java/likelion/MZConnent/domain/club/GenderRestriction.java create mode 100644 src/main/java/likelion/MZConnent/domain/club/RegionCategory.java create mode 100644 src/main/java/likelion/MZConnent/domain/culture/Culture.java create mode 100644 src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java create mode 100644 src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java create mode 100644 src/main/java/likelion/MZConnent/domain/manner/Manner.java create mode 100644 src/main/java/likelion/MZConnent/domain/review/Review.java create mode 100644 src/main/java/likelion/MZConnent/domain/review/ReviewComment.java create mode 100644 src/main/java/likelion/MZConnent/domain/review/ReviewLike.java create mode 100644 src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java create mode 100644 src/main/java/likelion/MZConnent/repository/chat/ChatRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/club/ClubMemberRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/club/ClubRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/club/RegionCategoryRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/culture/CultureCategoryRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/culture/CultureInterestRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/culture/CultureRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/manner/MannerRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/review/ReviewCommentRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/review/ReviewLikeRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/review/ReviewRepository.java create mode 100644 src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java diff --git a/.gradle/8.8/checksums/checksums.lock b/.gradle/8.8/checksums/checksums.lock new file mode 100644 index 0000000000000000000000000000000000000000..b35efe2aff0a5bda0f83f0f13792d1c6cccf7cf1 GIT binary patch literal 17 UcmZSXKG0g(lk~Za0Rkoi06LrnHvj+t literal 0 HcmV?d00001 diff --git a/.gradle/8.8/checksums/md5-checksums.bin b/.gradle/8.8/checksums/md5-checksums.bin new file mode 100644 index 0000000000000000000000000000000000000000..bb41d80d47c06a94b615e0bdba189355b59cc1e5 GIT binary patch literal 20847 zcmeI3do-0BgB>_*c5hmP>rjexZiz1Jr*2#k}?4w!lZf9P;st$k6t-$|3IHsDqdbqX49CBAj z%rm#@-e?}>jzjL0gL&4AXXjova%UiScsj@5d!4axVCbUpY|PKG7kjKzyY&g=oJE)y zpBiuylq8oR{ukyKdCm$mO7~MBclN`)x=4mM(hzHj#_z?vM*oz1nwi0N$hk`~zsr9R z6#7$;1>`QCnAcBj$=A|hjY96u!n|oQzixfa4o%1%Eiivlpwf|-KUN93^GVEqm%V*8 zv_J3?n*UGCUuMZ153EeiM*K(2N5Uhbj2F2bK=Vgo{^o)C?q)mnNHl*f=93xm1x6mV zrI2&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wK4z9 z==)0pJpn?ezL&UoRlj!s2d#mnp(2M{Oqz=stpN5m1I5c#)iK4Y6&h{M6L*;H(3Nn@ z8n+NGY&?>B=pQ#~9#Xqqrp;@pWOVc3j#*^=R%l`871{)`qfN5@iV{gONO*AHBW9Nb V+xk6aFT|Spp>+k9m{}t*>t7U5F6aON literal 0 HcmV?d00001 diff --git a/.gradle/8.8/dependencies-accessors/gc.properties b/.gradle/8.8/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock new file mode 100644 index 0000000000000000000000000000000000000000..31b722dffd4a9ca748d20a887f6fb79be1d6975e GIT binary patch literal 17 ScmZSHP-fmz;vOKx00jUjBLe~e literal 0 HcmV?d00001 diff --git a/.gradle/8.8/fileChanges/last-build.bin b/.gradle/8.8/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock new file mode 100644 index 0000000000000000000000000000000000000000..8da5bff25ba2e20fd80035c51d7cb6de96abf567 GIT binary patch literal 17 TcmZRcGGUkcmR8wd1}FdkFi!)r literal 0 HcmV?d00001 diff --git a/.gradle/8.8/gc.properties b/.gradle/8.8/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000000000000000000000000000000000000..d92917fdcaaaca349730c9c2db67b7b827e37a05 GIT binary patch literal 17 UcmZSnsC8m)WKdT(0|YPv05+`zMF0Q* literal 0 HcmV?d00001 diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..9055cc5 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Wed Jul 24 15:19:36 KST 2024 +gradle.version=8.8 diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/main/java/likelion/MZConnent/domain/chat/Chat.java b/src/main/java/likelion/MZConnent/domain/chat/Chat.java new file mode 100644 index 0000000..3df0c0f --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/chat/Chat.java @@ -0,0 +1,43 @@ +package likelion.MZConnent.domain.chat; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.club.Club; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "chats") +public class Chat { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long chatId; + + @Column(nullable = false) + private LocalDateTime createdDate; + + @Column(columnDefinition = "TEXT", nullable = false) + private String content; + + @ManyToOne + @JoinColumn(name = "clubId", nullable = false) + private Club club; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @Builder + public Chat(Long chatId, LocalDateTime createdDate, String content, Club club, Member member) { + this.chatId = chatId; + this.createdDate = createdDate; + this.content = content; + this.club = club; + this.member = member; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/club/AgeRestriction.java b/src/main/java/likelion/MZConnent/domain/club/AgeRestriction.java new file mode 100644 index 0000000..4546d44 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/club/AgeRestriction.java @@ -0,0 +1,32 @@ +package likelion.MZConnent.domain.club; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@RequiredArgsConstructor +@Slf4j +public enum AgeRestriction { + FOURTH_GRADE("4학년"), + FIFTH_GRADE("5학년"), + SIXTH_GRADE("6학년"), + ALL("없음"); + + private final String ageRestriction; + + @JsonValue + public String getAgeRestriction() { + return ageRestriction; + } + + @JsonCreator + public static AgeRestriction fromAgeRestriction(String ageRestriction) { + for (AgeRestriction aR : AgeRestriction.values()) { + if (aR.getAgeRestriction().equals(ageRestriction)) { + return aR; + } + } + throw new IllegalArgumentException(ageRestriction + "은 존재하지 않는 enum type입니다.(AgeRestriction)"); + } +} diff --git a/src/main/java/likelion/MZConnent/domain/club/Club.java b/src/main/java/likelion/MZConnent/domain/club/Club.java new file mode 100644 index 0000000..c72af3d --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/club/Club.java @@ -0,0 +1,84 @@ +package likelion.MZConnent.domain.club; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.chat.Chat; +import likelion.MZConnent.domain.culture.Culture; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; + +@Entity +@Table(name="clubs") +@Getter +@NoArgsConstructor +public class Club { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long clubId; + + @Column(length = 255, nullable = false) + private String title; + + @Column(nullable = false) + private LocalDate meetingDate; + + @Column(nullable = false) + private LocalDateTime createdDate; + + @Column(columnDefinition = "TEXT", nullable = false) + private String content; + + @Enumerated(EnumType.STRING) + @Column(nullable = false) + private GenderRestriction genderRestriction; + + @Enumerated(EnumType.STRING) + private AgeRestriction ageRestriction; + + @Column(nullable = false) + private int currentParticipant; + + @Column(nullable = false) + private int maxParticipant; + + @Column(nullable = false) + private String status; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "cultureId", nullable = false) + private Culture culture; + + @ManyToOne + @JoinColumn(name = "regionId", nullable = false) + private RegionCategory region; + + @OneToMany(mappedBy = "club") + private List chats; + + @OneToMany(mappedBy = "club") + private List clubMembers; + + + @Builder + public Club(Long clubId, String title, LocalDate meetingDate, LocalDateTime createdDate, String content, GenderRestriction genderRestriction, AgeRestriction ageRestriction, Integer currentParticipant, Integer maxParticipant, String status, Member member, Culture culture, RegionCategory region) { + this.clubId = clubId; + this.title = title; + this.meetingDate = meetingDate; + this.createdDate = createdDate; + this.content = content; + this.genderRestriction = genderRestriction; + this.ageRestriction = ageRestriction; + this.currentParticipant = currentParticipant; + this.maxParticipant = maxParticipant; + this.status = status; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/club/ClubMember.java b/src/main/java/likelion/MZConnent/domain/club/ClubMember.java new file mode 100644 index 0000000..337c122 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/club/ClubMember.java @@ -0,0 +1,43 @@ +package likelion.MZConnent.domain.club; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.manner.Manner; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "club_member") +public class ClubMember { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long clubMemberId; + + @Column(name = "role", nullable = false) + @Enumerated(EnumType.STRING) + private ClubRole clubRole; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "clubId", nullable = false) + private Club club; + + @OneToMany(mappedBy = "clubMember") + private List manners; + + @Builder + public ClubMember(Long clubMemberId, ClubRole clubRole, Member member, Club club) { + this.clubMemberId = clubMemberId; + this.clubRole = clubRole; + this.member = member; + this.club = club; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/club/ClubRole.java b/src/main/java/likelion/MZConnent/domain/club/ClubRole.java new file mode 100644 index 0000000..586b01c --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/club/ClubRole.java @@ -0,0 +1,27 @@ +package likelion.MZConnent.domain.club; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RequiredArgsConstructor +public enum ClubRole { + LEADER("모임장"), + MEMBER("모임원"); + + private final String clubRole; + + public String getClubRole() { + return clubRole; + } + + public static ClubRole fromRole(String role) { + for (ClubRole cR : ClubRole.values()) { + if (cR.getClubRole().equals(role)) { + return cR; + } + } + log.info("존재하지 않는 enum type(ClubRole): {}", role); + throw new IllegalArgumentException(role + "은 존재하지 않는 enum type입니다.(ClubRole)"); + } +} diff --git a/src/main/java/likelion/MZConnent/domain/club/GenderRestriction.java b/src/main/java/likelion/MZConnent/domain/club/GenderRestriction.java new file mode 100644 index 0000000..088195e --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/club/GenderRestriction.java @@ -0,0 +1,31 @@ +package likelion.MZConnent.domain.club; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +@RequiredArgsConstructor +@Slf4j +public enum GenderRestriction { + MALE("남자"), + FEMALE("여자"), + ALL("없음"); + + private final String genderRestriction; + + @JsonValue + public String getGenderRestriction() { + return genderRestriction; + } + + @JsonCreator + public static GenderRestriction fromGenderRestriction(String genderRestriction) { + for (GenderRestriction gR : GenderRestriction.values()) { + if (gR.getGenderRestriction().equals(genderRestriction)) { + return gR; + } + } + throw new IllegalArgumentException(genderRestriction + "은 존재하지 않는 enum type입니다.(GenderRestriction)"); + } +} diff --git a/src/main/java/likelion/MZConnent/domain/club/RegionCategory.java b/src/main/java/likelion/MZConnent/domain/club/RegionCategory.java new file mode 100644 index 0000000..4148a44 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/club/RegionCategory.java @@ -0,0 +1,25 @@ +package likelion.MZConnent.domain.club; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Entity +@NoArgsConstructor +@Getter +@Table(name = "region_categories") +public class RegionCategory { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long regionId; + + @Column(nullable = false) + private String name; + + @OneToMany(mappedBy = "region") + private List clubs; + +} + diff --git a/src/main/java/likelion/MZConnent/domain/culture/Culture.java b/src/main/java/likelion/MZConnent/domain/culture/Culture.java new file mode 100644 index 0000000..5d60807 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/culture/Culture.java @@ -0,0 +1,67 @@ +package likelion.MZConnent.domain.culture; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.club.Club; +import likelion.MZConnent.domain.review.Review; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.util.List; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "cultures") +public class Culture { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long cultureId; + + @Column(nullable = false) + private int interestCount; + + @Column(columnDefinition = "TEXT", nullable = false) + private String content; + + @Column(columnDefinition = "TEXT", nullable = false) + private String cultureImageUrl; + + @Column(nullable = false) + private String name; + + @Column(columnDefinition = "TEXT", nullable = false) + private String summary; + + @Column(nullable = false) + private int cultureCount; + + @Column(length = 100, nullable = false) + private String recommendedMember; + + @ManyToOne + @JoinColumn(name = "cultureCategoryId", nullable = false) + private CultureCategory cultureCategory; + + @OneToMany(mappedBy = "culture") + private List clubs; + + @OneToMany(mappedBy = "culture") + private List cultureInterests; + + @OneToMany(mappedBy = "culture") + private List reviews; + + @Builder + public Culture(Long cultureId, Integer interestCount, String content, String cultureImageUrl, String name, String summary, Integer cultureCount, String recommendedMember, CultureCategory cultureCategory) { + this.cultureId = cultureId; + this.interestCount = interestCount; + this.content = content; + this.cultureImageUrl = cultureImageUrl; + this.name = name; + this.summary = summary; + this.cultureCount = cultureCount; + this.recommendedMember = recommendedMember; + this.cultureCategory = cultureCategory; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java b/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java new file mode 100644 index 0000000..79a677c --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java @@ -0,0 +1,18 @@ +package likelion.MZConnent.domain.culture; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "culture_categories") +public class CultureCategory { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long cultureCategoryId; + + @Column(length = 255, nullable = false) + private String name; +} diff --git a/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java b/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java new file mode 100644 index 0000000..83e5491 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java @@ -0,0 +1,32 @@ +package likelion.MZConnent.domain.culture; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "culture_interests") +public class CultureInterest { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long cultureInterestId; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "cultureId", nullable = false) + private Culture culture; + + @Builder + public CultureInterest(Long cultureInterestId, Member member, Culture culture) { + this.cultureInterestId = cultureInterestId; + this.member = member; + this.culture = culture; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/manner/Manner.java b/src/main/java/likelion/MZConnent/domain/manner/Manner.java new file mode 100644 index 0000000..969100f --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/manner/Manner.java @@ -0,0 +1,40 @@ +package likelion.MZConnent.domain.manner; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.club.ClubMember; +import likelion.MZConnent.domain.member.Age; +import likelion.MZConnent.domain.member.Gender; +import likelion.MZConnent.domain.member.Member; +import likelion.MZConnent.domain.member.Role; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "manners") +public class Manner { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long mannerId; + + @Column(nullable = false) + private int score; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "clubMemberId", nullable = false) + private ClubMember clubMember; + + @Builder + public Manner(Long mannerId, Integer score, Member member, ClubMember clubMember) { + this.mannerId = mannerId; + this.score = score; + this.member = member; + this.clubMember = clubMember; + } +} \ No newline at end of file diff --git a/src/main/java/likelion/MZConnent/domain/review/Review.java b/src/main/java/likelion/MZConnent/domain/review/Review.java new file mode 100644 index 0000000..650cb17 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/review/Review.java @@ -0,0 +1,78 @@ +package likelion.MZConnent.domain.review; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.culture.Culture; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; +import java.util.List; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "reviews") +public class Review { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long reviewId; + + @Column(length = 255, nullable = false) + private String title; + + @Column(columnDefinition = "TEXT", nullable = false) + private String content; + + @Column(columnDefinition = "TEXT") + private String reviewImageUrl1; + + @Column(columnDefinition = "TEXT") + private String reviewImageUrl2; + + @Column(columnDefinition = "TEXT") + private String reviewImageUrl3; + + @Column(columnDefinition = "TEXT") + private String reviewImageUrl4; + + @Column(nullable = false) + private LocalDateTime createDate; + + @Column(nullable = false) + private int likeCount; + + @Column(nullable = false) + private int commentCount; + + @ManyToOne + @JoinColumn(name = "cultureId", nullable = false) + private Culture culture; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @OneToMany(mappedBy = "review") + private List reviewComments; + + @OneToMany(mappedBy = "review") + private List reviewLikes; + + @Builder + public Review(Long reviewId, String title, String content, String reviewImageUrl1, String reviewImageUrl2, String reviewImageUrl3, String reviewImageUrl4, LocalDateTime createDate, Integer likeCount, Integer commentCount, Culture culture, Member member) { + this.reviewId = reviewId; + this.title = title; + this.content = content; + this.reviewImageUrl1 = reviewImageUrl1 != null ? reviewImageUrl1 : ""; // 나중에 기본 이미지 URL 추가 + this.reviewImageUrl2 = reviewImageUrl2 != null ? reviewImageUrl2 : ""; + this.reviewImageUrl3 = reviewImageUrl3 != null ? reviewImageUrl3 : ""; + this.reviewImageUrl4 = reviewImageUrl4 != null ? reviewImageUrl4 : ""; + this.createDate = createDate; + this.likeCount = likeCount; + this.commentCount = commentCount; + this.culture = culture; + this.member = member; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java b/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java new file mode 100644 index 0000000..47ae08f --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java @@ -0,0 +1,42 @@ +package likelion.MZConnent.domain.review; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "review_comments") +public class ReviewComment { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long commentId; + + @Column(columnDefinition = "TEXT", nullable = false) + private String content; + + @Column(nullable = false) + private LocalDateTime createdDate; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "reviewId", nullable = false) + private Review review; + + @Builder + public ReviewComment(Long commentId, String content, LocalDateTime createdDate, Member member, Review review) { + this.commentId = commentId; + this.content = content; + this.createdDate = createdDate; + this.member = member; + this.review = review; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java b/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java new file mode 100644 index 0000000..adf21a2 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java @@ -0,0 +1,32 @@ +package likelion.MZConnent.domain.review; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "review_likes") +public class ReviewLike { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long reviewLikeId; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "reviewId", nullable = false) + private Review review; + + @Builder + public ReviewLike(Long reviewLikeId, Member member, Review review) { + this.reviewLikeId = reviewLikeId; + this.member = member; + this.review = review; + } +} diff --git a/src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java b/src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java new file mode 100644 index 0000000..4d5fed9 --- /dev/null +++ b/src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java @@ -0,0 +1,33 @@ +package likelion.MZConnent.domain.self; + +import jakarta.persistence.*; +import likelion.MZConnent.domain.culture.CultureCategory; +import likelion.MZConnent.domain.member.Member; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Entity +@Getter +@NoArgsConstructor +@Table(name = "self_introductions") +public class SelfIntroduction { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long selfIntroductionId; + + @ManyToOne + @JoinColumn(name = "memberId", nullable = false) + private Member member; + + @ManyToOne + @JoinColumn(name = "cultureCategoryId", nullable = false) + private CultureCategory cultureCategory; + + @Builder + public SelfIntroduction(Long selfIntroductionId, Member member, CultureCategory cultureCategory) { + this.selfIntroductionId = selfIntroductionId; + this.member = member; + this.cultureCategory = cultureCategory; + } +} \ No newline at end of file diff --git a/src/main/java/likelion/MZConnent/repository/chat/ChatRepository.java b/src/main/java/likelion/MZConnent/repository/chat/ChatRepository.java new file mode 100644 index 0000000..410d7a0 --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/chat/ChatRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.chat; + +import likelion.MZConnent.domain.chat.Chat; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ChatRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/club/ClubMemberRepository.java b/src/main/java/likelion/MZConnent/repository/club/ClubMemberRepository.java new file mode 100644 index 0000000..884bcba --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/club/ClubMemberRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.club; + +import likelion.MZConnent.domain.club.ClubMember; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ClubMemberRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java b/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java new file mode 100644 index 0000000..4f05998 --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/club/ClubRepository.java @@ -0,0 +1,10 @@ +package likelion.MZConnent.repository.club; + +import likelion.MZConnent.domain.club.Club; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ClubRepository extends JpaRepository { +} + diff --git a/src/main/java/likelion/MZConnent/repository/club/RegionCategoryRepository.java b/src/main/java/likelion/MZConnent/repository/club/RegionCategoryRepository.java new file mode 100644 index 0000000..e00daa2 --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/club/RegionCategoryRepository.java @@ -0,0 +1,10 @@ +package likelion.MZConnent.repository.club; + +import likelion.MZConnent.domain.club.RegionCategory; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface RegionCategoryRepository extends JpaRepository { +} + diff --git a/src/main/java/likelion/MZConnent/repository/culture/CultureCategoryRepository.java b/src/main/java/likelion/MZConnent/repository/culture/CultureCategoryRepository.java new file mode 100644 index 0000000..c00fd8a --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/culture/CultureCategoryRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.culture; + +import likelion.MZConnent.domain.culture.CultureCategory; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface CultureCategoryRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/culture/CultureInterestRepository.java b/src/main/java/likelion/MZConnent/repository/culture/CultureInterestRepository.java new file mode 100644 index 0000000..3c83187 --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/culture/CultureInterestRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.culture; + +import likelion.MZConnent.domain.culture.CultureInterest; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface CultureInterestRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/culture/CultureRepository.java b/src/main/java/likelion/MZConnent/repository/culture/CultureRepository.java new file mode 100644 index 0000000..d1ac4b9 --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/culture/CultureRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.culture; + +import likelion.MZConnent.domain.culture.Culture; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface CultureRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/manner/MannerRepository.java b/src/main/java/likelion/MZConnent/repository/manner/MannerRepository.java new file mode 100644 index 0000000..6afb9bd --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/manner/MannerRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.manner; + +import likelion.MZConnent.domain.manner.Manner; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface MannerRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/review/ReviewCommentRepository.java b/src/main/java/likelion/MZConnent/repository/review/ReviewCommentRepository.java new file mode 100644 index 0000000..d0ffc9a --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/review/ReviewCommentRepository.java @@ -0,0 +1,10 @@ +package likelion.MZConnent.repository.review; + +import likelion.MZConnent.domain.review.ReviewComment; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ReviewCommentRepository extends JpaRepository { +} + diff --git a/src/main/java/likelion/MZConnent/repository/review/ReviewLikeRepository.java b/src/main/java/likelion/MZConnent/repository/review/ReviewLikeRepository.java new file mode 100644 index 0000000..6a20243 --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/review/ReviewLikeRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.review; + +import likelion.MZConnent.domain.review.ReviewLike; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ReviewLikeRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/review/ReviewRepository.java b/src/main/java/likelion/MZConnent/repository/review/ReviewRepository.java new file mode 100644 index 0000000..ee8761c --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/review/ReviewRepository.java @@ -0,0 +1,9 @@ +package likelion.MZConnent.repository.review; + +import likelion.MZConnent.domain.review.Review; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ReviewRepository extends JpaRepository { +} diff --git a/src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java b/src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java new file mode 100644 index 0000000..545a6bf --- /dev/null +++ b/src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java @@ -0,0 +1,10 @@ +package likelion.MZConnent.repository.self; + +import likelion.MZConnent.domain.self.SelfIntroduction; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface SelfIntroductionRepository extends JpaRepository { +} + From 299d6865c2295aeea85a55ad0301e673eb9a1f78 Mon Sep 17 00:00:00 2001 From: oosedus Date: Wed, 24 Jul 2024 19:55:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactoring:=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../likelion/MZConnent/domain/chat/Chat.java | 3 +-- .../likelion/MZConnent/domain/club/Club.java | 6 ++++-- .../MZConnent/domain/club/ClubMember.java | 3 +-- .../MZConnent/domain/culture/Culture.java | 3 +-- .../domain/culture/CultureCategory.java | 7 +++++++ .../domain/culture/CultureInterest.java | 3 +-- .../MZConnent/domain/manner/Manner.java | 3 +-- .../{self => member}/SelfIntroduction.java | 17 ++++++++--------- .../MZConnent/domain/review/Review.java | 3 +-- .../MZConnent/domain/review/ReviewComment.java | 3 +-- .../MZConnent/domain/review/ReviewLike.java | 3 +-- .../SelfIntroductionRepository.java | 4 ++-- 12 files changed, 29 insertions(+), 29 deletions(-) rename src/main/java/likelion/MZConnent/domain/{self => member}/SelfIntroduction.java (54%) rename src/main/java/likelion/MZConnent/repository/{self => member}/SelfIntroductionRepository.java (68%) diff --git a/src/main/java/likelion/MZConnent/domain/chat/Chat.java b/src/main/java/likelion/MZConnent/domain/chat/Chat.java index 3df0c0f..5d818cf 100644 --- a/src/main/java/likelion/MZConnent/domain/chat/Chat.java +++ b/src/main/java/likelion/MZConnent/domain/chat/Chat.java @@ -33,8 +33,7 @@ public class Chat { private Member member; @Builder - public Chat(Long chatId, LocalDateTime createdDate, String content, Club club, Member member) { - this.chatId = chatId; + public Chat(LocalDateTime createdDate, String content, Club club, Member member) { this.createdDate = createdDate; this.content = content; this.club = club; diff --git a/src/main/java/likelion/MZConnent/domain/club/Club.java b/src/main/java/likelion/MZConnent/domain/club/Club.java index c72af3d..deff01f 100644 --- a/src/main/java/likelion/MZConnent/domain/club/Club.java +++ b/src/main/java/likelion/MZConnent/domain/club/Club.java @@ -69,8 +69,7 @@ public class Club { @Builder - public Club(Long clubId, String title, LocalDate meetingDate, LocalDateTime createdDate, String content, GenderRestriction genderRestriction, AgeRestriction ageRestriction, Integer currentParticipant, Integer maxParticipant, String status, Member member, Culture culture, RegionCategory region) { - this.clubId = clubId; + public Club(String title, LocalDate meetingDate, LocalDateTime createdDate, String content, GenderRestriction genderRestriction, AgeRestriction ageRestriction, int currentParticipant, int maxParticipant, String status, Member member, Culture culture, RegionCategory region) { this.title = title; this.meetingDate = meetingDate; this.createdDate = createdDate; @@ -80,5 +79,8 @@ public Club(Long clubId, String title, LocalDate meetingDate, LocalDateTime crea this.currentParticipant = currentParticipant; this.maxParticipant = maxParticipant; this.status = status; + this.member = member; + this.culture = culture; + this.region = region; } } diff --git a/src/main/java/likelion/MZConnent/domain/club/ClubMember.java b/src/main/java/likelion/MZConnent/domain/club/ClubMember.java index 337c122..d2290f3 100644 --- a/src/main/java/likelion/MZConnent/domain/club/ClubMember.java +++ b/src/main/java/likelion/MZConnent/domain/club/ClubMember.java @@ -34,8 +34,7 @@ public class ClubMember { private List manners; @Builder - public ClubMember(Long clubMemberId, ClubRole clubRole, Member member, Club club) { - this.clubMemberId = clubMemberId; + public ClubMember(ClubRole clubRole, Member member, Club club) { this.clubRole = clubRole; this.member = member; this.club = club; diff --git a/src/main/java/likelion/MZConnent/domain/culture/Culture.java b/src/main/java/likelion/MZConnent/domain/culture/Culture.java index 5d60807..24bbe63 100644 --- a/src/main/java/likelion/MZConnent/domain/culture/Culture.java +++ b/src/main/java/likelion/MZConnent/domain/culture/Culture.java @@ -53,8 +53,7 @@ public class Culture { private List reviews; @Builder - public Culture(Long cultureId, Integer interestCount, String content, String cultureImageUrl, String name, String summary, Integer cultureCount, String recommendedMember, CultureCategory cultureCategory) { - this.cultureId = cultureId; + public Culture(int interestCount, String content, String cultureImageUrl, String name, String summary, int cultureCount, String recommendedMember, CultureCategory cultureCategory) { this.interestCount = interestCount; this.content = content; this.cultureImageUrl = cultureImageUrl; diff --git a/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java b/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java index 79a677c..79358ca 100644 --- a/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java +++ b/src/main/java/likelion/MZConnent/domain/culture/CultureCategory.java @@ -1,9 +1,13 @@ package likelion.MZConnent.domain.culture; import jakarta.persistence.*; +import likelion.MZConnent.domain.member.SelfIntroduction; import lombok.Getter; import lombok.NoArgsConstructor; +import java.util.ArrayList; +import java.util.List; + @Entity @Getter @NoArgsConstructor @@ -15,4 +19,7 @@ public class CultureCategory { @Column(length = 255, nullable = false) private String name; + + @OneToMany(mappedBy = "cultureCategory", cascade = CascadeType.ALL) + private List selfIntroductions = new ArrayList<>(); } diff --git a/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java b/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java index 83e5491..118fabc 100644 --- a/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java +++ b/src/main/java/likelion/MZConnent/domain/culture/CultureInterest.java @@ -24,8 +24,7 @@ public class CultureInterest { private Culture culture; @Builder - public CultureInterest(Long cultureInterestId, Member member, Culture culture) { - this.cultureInterestId = cultureInterestId; + public CultureInterest(Member member, Culture culture) { this.member = member; this.culture = culture; } diff --git a/src/main/java/likelion/MZConnent/domain/manner/Manner.java b/src/main/java/likelion/MZConnent/domain/manner/Manner.java index 969100f..0665d74 100644 --- a/src/main/java/likelion/MZConnent/domain/manner/Manner.java +++ b/src/main/java/likelion/MZConnent/domain/manner/Manner.java @@ -31,8 +31,7 @@ public class Manner { private ClubMember clubMember; @Builder - public Manner(Long mannerId, Integer score, Member member, ClubMember clubMember) { - this.mannerId = mannerId; + public Manner(int score, Member member, ClubMember clubMember) { this.score = score; this.member = member; this.clubMember = clubMember; diff --git a/src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java b/src/main/java/likelion/MZConnent/domain/member/SelfIntroduction.java similarity index 54% rename from src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java rename to src/main/java/likelion/MZConnent/domain/member/SelfIntroduction.java index 4d5fed9..05581ae 100644 --- a/src/main/java/likelion/MZConnent/domain/self/SelfIntroduction.java +++ b/src/main/java/likelion/MZConnent/domain/member/SelfIntroduction.java @@ -1,8 +1,7 @@ -package likelion.MZConnent.domain.self; +package likelion.MZConnent.domain.member; import jakarta.persistence.*; import likelion.MZConnent.domain.culture.CultureCategory; -import likelion.MZConnent.domain.member.Member; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @@ -14,19 +13,19 @@ public class SelfIntroduction { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long selfIntroductionId; + @Column(name = "self_introduction_id") + private Long id; - @ManyToOne - @JoinColumn(name = "memberId", nullable = false) + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "member_id") private Member member; - @ManyToOne - @JoinColumn(name = "cultureCategoryId", nullable = false) + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "culture_category_id") private CultureCategory cultureCategory; @Builder - public SelfIntroduction(Long selfIntroductionId, Member member, CultureCategory cultureCategory) { - this.selfIntroductionId = selfIntroductionId; + public SelfIntroduction(Member member, CultureCategory cultureCategory) { this.member = member; this.cultureCategory = cultureCategory; } diff --git a/src/main/java/likelion/MZConnent/domain/review/Review.java b/src/main/java/likelion/MZConnent/domain/review/Review.java index 650cb17..b85eb39 100644 --- a/src/main/java/likelion/MZConnent/domain/review/Review.java +++ b/src/main/java/likelion/MZConnent/domain/review/Review.java @@ -61,8 +61,7 @@ public class Review { private List reviewLikes; @Builder - public Review(Long reviewId, String title, String content, String reviewImageUrl1, String reviewImageUrl2, String reviewImageUrl3, String reviewImageUrl4, LocalDateTime createDate, Integer likeCount, Integer commentCount, Culture culture, Member member) { - this.reviewId = reviewId; + public Review(String title, String content, String reviewImageUrl1, String reviewImageUrl2, String reviewImageUrl3, String reviewImageUrl4, LocalDateTime createDate, int likeCount, int commentCount, Culture culture, Member member) { this.title = title; this.content = content; this.reviewImageUrl1 = reviewImageUrl1 != null ? reviewImageUrl1 : ""; // 나중에 기본 이미지 URL 추가 diff --git a/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java b/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java index 47ae08f..a8713a9 100644 --- a/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java +++ b/src/main/java/likelion/MZConnent/domain/review/ReviewComment.java @@ -32,8 +32,7 @@ public class ReviewComment { private Review review; @Builder - public ReviewComment(Long commentId, String content, LocalDateTime createdDate, Member member, Review review) { - this.commentId = commentId; + public ReviewComment(String content, LocalDateTime createdDate, Member member, Review review) { this.content = content; this.createdDate = createdDate; this.member = member; diff --git a/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java b/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java index adf21a2..5d3dc68 100644 --- a/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java +++ b/src/main/java/likelion/MZConnent/domain/review/ReviewLike.java @@ -24,8 +24,7 @@ public class ReviewLike { private Review review; @Builder - public ReviewLike(Long reviewLikeId, Member member, Review review) { - this.reviewLikeId = reviewLikeId; + public ReviewLike(Member member, Review review) { this.member = member; this.review = review; } diff --git a/src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java b/src/main/java/likelion/MZConnent/repository/member/SelfIntroductionRepository.java similarity index 68% rename from src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java rename to src/main/java/likelion/MZConnent/repository/member/SelfIntroductionRepository.java index 545a6bf..b525921 100644 --- a/src/main/java/likelion/MZConnent/repository/self/SelfIntroductionRepository.java +++ b/src/main/java/likelion/MZConnent/repository/member/SelfIntroductionRepository.java @@ -1,6 +1,6 @@ -package likelion.MZConnent.repository.self; +package likelion.MZConnent.repository.member; -import likelion.MZConnent.domain.self.SelfIntroduction; +import likelion.MZConnent.domain.member.SelfIntroduction; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository;