Skip to content
This repository was archived by the owner on Jan 11, 2026. It is now read-only.
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
17 changes: 5 additions & 12 deletions src/main/java/com/example/spot/domain/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

@Entity
@Getter
@Builder
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
public class Region extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand All @@ -28,25 +31,15 @@ public class Region extends BaseEntity {

private String neighborhood;

@Builder.Default
@OneToMany(mappedBy = "region")
private List<RegionStudy> regionStudyList = new ArrayList<>();

@Builder.Default
@OneToMany(mappedBy = "region")
private List<PreferredRegion> prefferedRegionList = new ArrayList<>();


/* ----------------------------- 생성자 ------------------------------------- */

protected Region() {}

@Builder
public Region(String code, String province, String district, String neighborhood) {
this.code = code;
this.province = province;
this.district = district;
this.neighborhood = neighborhood;
}

/* ----------------------------- 연관관계 메소드 ------------------------------------- */

public void addRegionStudy(RegionStudy regionStudy) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/example/spot/domain/Theme.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import lombok.Builder;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
Expand All @@ -34,12 +35,14 @@ public class Theme extends BaseEntity {
private ThemeType studyTheme;

//== 해당 테마를 선호하는 멤버 목록 ==//
@Builder.Default
@OneToMany(mappedBy = "theme", cascade = CascadeType.ALL)
private List<MemberTheme> memberThemeList;
private List<MemberTheme> memberThemeList = new ArrayList<>();

//== 테마별 스터디 목록 ==//
@Builder.Default
@OneToMany(mappedBy = "theme", cascade = CascadeType.ALL)
private List<StudyTheme> studyThemeList;
private List<StudyTheme> studyThemeList = new ArrayList<>();

/* ----------------------------- 연관관계 메소드 ------------------------------------- */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public ApiResponse<StudyInfoResponseDTO.StudyInfoDTO> getStudyInfo(
## [스터디 생성/참여] 스터디 페이지 > 신청하기 클릭, 로그인한 회원이 스터디에 신청합니다.
로그인한 회원이 member_study에 application_status = APPLIED 상태로 추가됩니다.
""")
@Parameter(name = "memberId", description = "스터디에 참여하는 회원의 id를 입력 받습니다.", required = true)
@Parameter(name = "studyId", description = "참여할 스터디의 id를 입력 받습니다.", required = true)
@PostMapping("/studies/{studyId}")
public ApiResponse<StudyJoinResponseDTO.JoinDTO> applyToStudy(
Expand All @@ -67,7 +66,6 @@ public ApiResponse<StudyJoinResponseDTO.JoinDTO> applyToStudy(

regions에는 지역 코드를 입력해야 합니다.
""")
@Parameter(name = "memberId", description = "스터디를 생성할 회원의 id를 입력 받습니다.", required = true)
@PostMapping("/studies")
public ApiResponse<StudyRegisterResponseDTO.RegisterDTO> registerStudy(
@RequestBody @Valid StudyRegisterRequestDTO.RegisterDTO studyRegisterRequestDTO) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import com.example.spot.validation.annotation.TextLength;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
public class StudyJoinRequestDTO {

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class StudyJoinDTO {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.example.spot.validation.annotation.LongSize;
import com.example.spot.validation.annotation.TextLength;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

Expand All @@ -15,6 +16,7 @@
public class StudyRegisterRequestDTO {

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class RegisterDTO {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static JoinDTO toDTO(Member member, Study study) {
}

@Getter
private static class TitleDTO {
public static class TitleDTO {

private final Long studyId;
private final String title;
Expand Down
Loading
Loading