-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37f4593
commit fc34a0f
Showing
12 changed files
with
209 additions
and
29 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
21 changes: 21 additions & 0 deletions
21
src/main/java/likelion/MZConnent/config/SwaggerConfig.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,21 @@ | ||
package likelion.MZConnent.config; | ||
|
||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SwaggerConfig { | ||
@Bean | ||
public OpenAPI openAPI() { | ||
|
||
Info info = new Info() | ||
.version("v1.0.0") | ||
.title("요즘 애들 뭐햐 API") | ||
.description("요즘 애들 뭐햐 API 목록입니다."); | ||
|
||
return new OpenAPI() | ||
.info(info); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/likelion/MZConnent/domain/culture/CultureCategory.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,25 @@ | ||
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 | ||
public class CultureCategory { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "culture_category_id") | ||
private Long id; | ||
|
||
private String name; | ||
|
||
@OneToMany(mappedBy = "cultureCategory", cascade = CascadeType.ALL) | ||
private List<SelfIntroduction> selfIntroductions = new ArrayList<>(); | ||
|
||
} |
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
32 changes: 32 additions & 0 deletions
32
src/main/java/likelion/MZConnent/domain/member/SelfIntroduction.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,32 @@ | ||
package likelion.MZConnent.domain.member; | ||
|
||
import jakarta.persistence.*; | ||
import likelion.MZConnent.domain.culture.CultureCategory; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor | ||
public class SelfIntroduction { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "self_introduction_id") | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "member_id") | ||
private Member member; | ||
|
||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "culture_category_id") | ||
private CultureCategory cultureCategory; | ||
|
||
@Builder | ||
public SelfIntroduction(Member member, CultureCategory cultureCategory) { | ||
this.member = member; | ||
this.cultureCategory = cultureCategory; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
import org.springframework.http.HttpStatus; | ||
|
||
/** | ||
* 에러 메시지 커스텀 클래스 | ||
* 응답 커스텀 클래스 | ||
*/ | ||
@Getter | ||
@ToString | ||
|
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
9 changes: 9 additions & 0 deletions
9
src/main/java/likelion/MZConnent/repository/culture/CultureCategoryRepository.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,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<CultureCategory, 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
9 changes: 9 additions & 0 deletions
9
src/main/java/likelion/MZConnent/repository/member/SelfIntroductionRepository.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,9 @@ | ||
package likelion.MZConnent.repository.member; | ||
|
||
import likelion.MZConnent.domain.member.SelfIntroduction; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface SelfIntroductionRepository extends JpaRepository<SelfIntroduction, 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
Oops, something went wrong.