-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat #18 : 커스텀에러 코드 적용, 자잘한 버그 수정 * feat : #18 모델소개 조회 api 생성 * refactor : #18 식별관계로 변경 * feat : #18 모델 조회 및 생성 api * 왜안돼? * bug : 분리 실패 * fix : #18 Entity -> dto 전부 변환 * refactor : #18 service 로직 내에서 entity -> dto 변환 * feat : 더미sql 추가 * fix : 모델소개 생성 api 주석 처리 * fix : #18 data.sql 원복 * feat : #18 모델 이름으로 조회하도록 변경
- Loading branch information
Showing
24 changed files
with
456 additions
and
153 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
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
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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/backend/soullive_a/dto/request/ModelRecentAdvertisementRequest.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,10 @@ | ||
package com.backend.soullive_a.dto.request; | ||
|
||
|
||
public record ModelRecentAdvertisementRequest( | ||
String imageUrl, | ||
|
||
Integer year, | ||
String brand | ||
) { | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/backend/soullive_a/dto/request/ModelRecentWorkRequest.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,15 @@ | ||
package com.backend.soullive_a.dto.request; | ||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
|
||
public record ModelRecentWorkRequest( | ||
String imageUrl, | ||
|
||
Integer year, | ||
String category, | ||
String title, | ||
String genre, | ||
String role | ||
|
||
) { | ||
} |
18 changes: 13 additions & 5 deletions
18
src/main/java/com/backend/soullive_a/dto/request/ModelRequest.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 |
---|---|---|
@@ -1,14 +1,22 @@ | ||
package com.backend.soullive_a.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
import java.time.LocalDate; | ||
|
||
public record ModelRequest( | ||
@NotNull String modelName, | ||
@NotNull LocalDate birth, | ||
@NotNull String job, | ||
|
||
String imageUrl, | ||
String modelName, | ||
LocalDate birth, | ||
String age, | ||
String job, | ||
|
||
String info, | ||
@NotNull String agency, | ||
@NotNull Float aiRate) { | ||
String agency, | ||
|
||
|
||
Float aiRate) { | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/backend/soullive_a/dto/response/ModelImageKeywordResponse.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,16 @@ | ||
package com.backend.soullive_a.dto.response; | ||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ModelImageKeywordResponse( | ||
// Long id, | ||
String keyord | ||
// Model model //필요한가? | ||
) { | ||
} |
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
17 changes: 17 additions & 0 deletions
17
src/main/java/com/backend/soullive_a/dto/response/ModelRecentAdvertisementResponse.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,17 @@ | ||
package com.backend.soullive_a.dto.response; | ||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ModelRecentAdvertisementResponse( | ||
String imageUrl, | ||
Integer year, | ||
String brand | ||
|
||
) { | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/backend/soullive_a/dto/response/ModelRecentWorkResponse.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 com.backend.soullive_a.dto.response; | ||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
import jakarta.persistence.Column; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ModelRecentWorkResponse( | ||
String imageUrl, | ||
|
||
Integer year, | ||
String category, | ||
String title, | ||
String genre, | ||
String role | ||
|
||
) { | ||
} |
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
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
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
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
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
8 changes: 6 additions & 2 deletions
8
...pository/ModelImageKeywordRepository.java → ...oduction/ModelImageKeywordRepository.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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package com.backend.soullive_a.repository; | ||
package com.backend.soullive_a.repository.model.introduction; | ||
|
||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
|
||
import com.backend.soullive_a.entity.model.introduction.ModelImageKeyword; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface ModelImageKeywordRepository extends JpaRepository<ModelImageKeyword, Long> { | ||
public List<ModelImageKeyword> findAllById(Long modelId); | ||
public List<ModelImageKeyword> findAllByModel(Model model); | ||
|
||
} | ||
|
4 changes: 3 additions & 1 deletion
4
...pository/ModelIntroductionRepository.java → ...oduction/ModelIntroductionRepository.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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package com.backend.soullive_a.repository; | ||
package com.backend.soullive_a.repository.model.introduction; | ||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
import com.backend.soullive_a.entity.model.introduction.ModelIntroduction; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface ModelIntroductionRepository extends JpaRepository<ModelIntroduction, Long> { | ||
public ModelIntroduction findByModelModelName(String name); | ||
} | ||
|
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
8 changes: 6 additions & 2 deletions
8
...repository/ModelRecentWorkRepository.java → ...troduction/ModelRecentWorkRepository.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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
package com.backend.soullive_a.repository; | ||
package com.backend.soullive_a.repository.model.introduction; | ||
|
||
import com.backend.soullive_a.entity.model.Model; | ||
|
||
import com.backend.soullive_a.entity.model.introduction.ModelRecentWork; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface ModelRecentWorkRepository extends JpaRepository<ModelRecentWork, Long> { | ||
public List<ModelRecentWork> findAllById(Long modelId); | ||
|
||
public List<ModelRecentWork> findAllByModel(Model model); | ||
|
||
} | ||
|
Oops, something went wrong.