From 7a670ad11b69b971602855e0552d0ebc8df233a6 Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 00:35:54 +0900 Subject: [PATCH 1/7] =?UTF-8?q?feat:#29=20=EC=9D=B4=EC=8A=88=20=EB=B0=8F?= =?UTF-8?q?=20=EB=89=B4=EC=8A=A4=20=EC=97=94=ED=8B=B0=ED=8B=B0=20=E3=85=85?= =?UTF-8?q?=20=E3=85=90=E3=85=87=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/model/issue/ModelIssue.java | 31 ++++++++++++++++++ .../entity/model/issue/ModelNews.java | 32 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java create mode 100644 src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java diff --git a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java new file mode 100644 index 0000000..b3eb3e9 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java @@ -0,0 +1,31 @@ +package com.backend.soullive_a.entity.model.issue; + +import com.backend.soullive_a.entity.model.Model; +import jakarta.persistence.*; +import lombok.*; + +@Entity +@Getter +@Builder +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@AllArgsConstructor +public class ModelIssue { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "MODEL_ISSUE_ID", nullable = false) + private Long id; + + @Column(name = "SCORE_URL", nullable = false) + private String scoreUrl; + + @Column(name = "AI_COMMENT", nullable = false) + private String aiComment; + + @Column(name = "CRIME", nullable = false) + private Integer crime; + + @Column + @OneToOne + @JoinColumn(name = "MODEL_ID", nullable = false) + private Model model; +} diff --git a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java new file mode 100644 index 0000000..4a6293f --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java @@ -0,0 +1,32 @@ +package com.backend.soullive_a.entity.model.issue; + +import jakarta.persistence.*; +import lombok.*; + +import java.time.LocalDate; + +@Getter +@Entity +@Builder +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@AllArgsConstructor +public class ModelNews { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "issueId", nullable = false) + private Long id; + + @Column(name = "NEWS_DATE", nullable = false) + private LocalDate newsDate; + + @Column(name = "TITLE", nullable = false) + private String title; + + @Column(name = "NEWS_URL", nullable = false) + private String newsUrl; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "MODEL_ISSUE", nullable = false) + private ModelIssue modelIssue; + +} From 8432df6c7fb0f559440f0a2cf47ed3a4a3352df6 Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 01:38:47 +0900 Subject: [PATCH 2/7] =?UTF-8?q?feat=20:=20#18=20=EB=A0=88=ED=8F=AC?= =?UTF-8?q?=EC=A7=80=ED=86=A0=EB=A6=AC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/model/issue/ModelIssueRepository.java | 10 ++++++++++ .../repository/model/issue/ModelNewsRepository.java | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/main/java/com/backend/soullive_a/repository/model/issue/ModelIssueRepository.java create mode 100644 src/main/java/com/backend/soullive_a/repository/model/issue/ModelNewsRepository.java diff --git a/src/main/java/com/backend/soullive_a/repository/model/issue/ModelIssueRepository.java b/src/main/java/com/backend/soullive_a/repository/model/issue/ModelIssueRepository.java new file mode 100644 index 0000000..897131f --- /dev/null +++ b/src/main/java/com/backend/soullive_a/repository/model/issue/ModelIssueRepository.java @@ -0,0 +1,10 @@ +package com.backend.soullive_a.repository.model.issue; + +import com.backend.soullive_a.entity.model.issue.ModelIssue; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.Optional; + +public interface ModelIssueRepository extends JpaRepository { + public Optional findByModelModelName(String modelName); +} diff --git a/src/main/java/com/backend/soullive_a/repository/model/issue/ModelNewsRepository.java b/src/main/java/com/backend/soullive_a/repository/model/issue/ModelNewsRepository.java new file mode 100644 index 0000000..10e8771 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/repository/model/issue/ModelNewsRepository.java @@ -0,0 +1,12 @@ +package com.backend.soullive_a.repository.model.issue; + +import com.backend.soullive_a.entity.model.issue.ModelIssue; +import com.backend.soullive_a.entity.model.issue.ModelNews; +import com.backend.soullive_a.entity.model.popularity.ModelPopularGender; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +public interface ModelNewsRepository extends JpaRepository { + List findAllByModelIssueModelModelName(String modelName); +} From ddbecbf8432e8912b5783751be991e9805022e85 Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 02:09:53 +0900 Subject: [PATCH 3/7] =?UTF-8?q?feat=20:=20#29=20=EB=B6=80=EC=A0=95?= =?UTF-8?q?=EC=9D=B4=EC=8A=88=20=EC=A1=B0=ED=9A=8C=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EB=A1=9C=EC=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/issue/ModelIssueResponse.java | 14 +++++ .../model/issue/ModelNewsResponse.java | 15 +++++ .../entity/model/issue/ModelNews.java | 3 + .../soullive_a/service/ModelIssueService.java | 8 +++ .../service/impl/ModelIssueImpl.java | 59 +++++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelIssueResponse.java create mode 100644 src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelNewsResponse.java create mode 100644 src/main/java/com/backend/soullive_a/service/ModelIssueService.java create mode 100644 src/main/java/com/backend/soullive_a/service/impl/ModelIssueImpl.java diff --git a/src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelIssueResponse.java b/src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelIssueResponse.java new file mode 100644 index 0000000..47abd74 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelIssueResponse.java @@ -0,0 +1,14 @@ +package com.backend.soullive_a.dto.response.model.issue; + +import lombok.Builder; + +import java.util.List; + +@Builder +public record ModelIssueResponse( + String scoreUrl, + String aiComment, + Integer crime, + List modelNewsResponseList +) { +} diff --git a/src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelNewsResponse.java b/src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelNewsResponse.java new file mode 100644 index 0000000..57cff58 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/dto/response/model/issue/ModelNewsResponse.java @@ -0,0 +1,15 @@ +package com.backend.soullive_a.dto.response.model.issue; + +import jakarta.persistence.Column; +import lombok.Builder; + +import java.time.LocalDate; + +@Builder +public record ModelNewsResponse( + String company, + LocalDate newsDate, + String title, + String newsUrl +) { +} diff --git a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java index 4a6293f..05c2880 100644 --- a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java +++ b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java @@ -16,6 +16,9 @@ public class ModelNews { @Column(name = "issueId", nullable = false) private Long id; + @Column(name = "COMPANY", nullable = false) + private String company; + @Column(name = "NEWS_DATE", nullable = false) private LocalDate newsDate; diff --git a/src/main/java/com/backend/soullive_a/service/ModelIssueService.java b/src/main/java/com/backend/soullive_a/service/ModelIssueService.java new file mode 100644 index 0000000..3398821 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/service/ModelIssueService.java @@ -0,0 +1,8 @@ +package com.backend.soullive_a.service; + + +import com.backend.soullive_a.dto.response.model.issue.ModelIssueResponse; + +public interface ModelIssueService { + public ModelIssueResponse getIssue(String name); +} diff --git a/src/main/java/com/backend/soullive_a/service/impl/ModelIssueImpl.java b/src/main/java/com/backend/soullive_a/service/impl/ModelIssueImpl.java new file mode 100644 index 0000000..3ff5ccb --- /dev/null +++ b/src/main/java/com/backend/soullive_a/service/impl/ModelIssueImpl.java @@ -0,0 +1,59 @@ +package com.backend.soullive_a.service.impl; + +import com.backend.soullive_a.constant.GenderType; +import com.backend.soullive_a.dto.response.model.issue.ModelIssueResponse; +import com.backend.soullive_a.dto.response.model.issue.ModelNewsResponse; +import com.backend.soullive_a.entity.model.issue.ModelIssue; +import com.backend.soullive_a.entity.model.issue.ModelNews; +import com.backend.soullive_a.entity.model.popularity.ModelPopularGender; +import com.backend.soullive_a.exception.custom.NotFoundUserException; +import com.backend.soullive_a.repository.model.issue.ModelIssueRepository; +import com.backend.soullive_a.repository.model.issue.ModelNewsRepository; +import com.backend.soullive_a.service.ModelIssueService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Service +@RequiredArgsConstructor +public class ModelIssueImpl implements ModelIssueService { + + private final ModelIssueRepository modelIssueRepository; + private final ModelNewsRepository modelNewsRepository; + + /** + * 부정이슈 조회 서비스로직 + * @param modelName + * @return + */ + @Override + public ModelIssueResponse getIssue(String modelName) { + ModelIssue modelIssue = modelIssueRepository.findByModelModelName(modelName) + .orElseThrow(() -> new NotFoundUserException()); + + List modelNewsList = modelNewsRepository.findAllByModelIssueModelModelName(modelName); + + List modelNewsResponse = new ArrayList<>(); + + for (ModelNews modelNews : modelNewsList) { + modelNewsResponse.add( + ModelNewsResponse.builder() + .company(modelNews.getCompany()) + .newsDate(modelNews.getNewsDate()) + .title(modelNews.getTitle()) + .newsUrl(modelNews.getNewsUrl()) + .build() + ); + } + + return ModelIssueResponse.builder() + .scoreUrl(modelIssue.getScoreUrl()) + .aiComment(modelIssue.getAiComment()) + .crime(modelIssue.getCrime()) + .modelNewsResponseList(modelNewsResponse) + .build(); + } +} From 02da8b78bd50b9bf7bb824429f2df72ef79a4b4e Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 02:24:37 +0900 Subject: [PATCH 4/7] =?UTF-8?q?feat=20:=20#18=20=EB=AA=A8=EB=8D=B8?= =?UTF-8?q?=EC=9D=B4=EC=8A=88=20=EC=A1=B0=ED=9A=8C=20controller=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ModelIssueController.java | 26 +++++++++++++++++++ .../entity/model/issue/ModelIssue.java | 1 - src/main/resources/data.sql | 20 +++++++------- 3 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 src/main/java/com/backend/soullive_a/controller/ModelIssueController.java diff --git a/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java b/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java new file mode 100644 index 0000000..c26735b --- /dev/null +++ b/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java @@ -0,0 +1,26 @@ +package com.backend.soullive_a.controller; + +import com.backend.soullive_a.dto.response.model.issue.ModelIssueResponse; +import com.backend.soullive_a.exception.base.BaseResponse; +import com.backend.soullive_a.service.ModelIssueService; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequiredArgsConstructor +@RequestMapping("model/issue") +public class ModelIssueController { + private final ModelIssueService modelIssueService; + @GetMapping() + public BaseResponse getIssue(@RequestParam String modelName) { + return BaseResponse.builder() + .code(200) + .message("부정이슈 조회에 성공했습니다.") + .isSuccess(true) + .data(modelIssueService.getIssue(modelName)) + .build(); + } +} diff --git a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java index b3eb3e9..dce32b4 100644 --- a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java +++ b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelIssue.java @@ -24,7 +24,6 @@ public class ModelIssue { @Column(name = "CRIME", nullable = false) private Integer crime; - @Column @OneToOne @JoinColumn(name = "MODEL_ID", nullable = false) private Model model; diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index fb495f0..bf2a40f 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -1,14 +1,14 @@ -- 유저 -INSERT INTO soullive.user (user_id, password, phone_number) VALUES (1, 'password', '010-0000-0000'); +INSERT INTO test_jinwoo.user (user_id, password, phone_number) VALUES (1, 'password', '010-0000-0000'); -- 모델1 김희애 -INSERT INTO soullive.model (model_id, model_name, birth, age, job, info, agency, ai_rate, image_url) +INSERT INTO test_jinwoo.model (model_id, model_name, birth, age, job, info, agency, ai_rate, image_url) VALUES (1, '김희애', '1967-04-23', '56세', '텔런트/영화배우', '', 'YG 엔터테인먼트', 4.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'); -INSERT INTO soullive.model_introduction (model_id, model_introduction_id) VALUES (1, 1); +INSERT INTO test_jinwoo.model_introduction (model_id, model_introduction_id) VALUES (1, 1); -- 모델1 김희애 모델소개 -INSERT INTO soullive.model_image_keyword (model_image_keyword_id, model_id, keyword) +INSERT INTO test_jinwoo.model_image_keyword (model_image_keyword_id, model_id, keyword) VALUES (1, 1, '#세련됨'), (2, 1, '#프로페셔널'), @@ -18,33 +18,33 @@ VALUES (6, 1, '#럭셔리함'), (7, 1, '#신뢰감'); -INSERT INTO soullive.model_recent_work (model_recent_work_id, `year`, model_id, category, genre, image_url, `role`, title) +INSERT INTO test_jinwoo.model_recent_work (model_recent_work_id, `year`, model_id, category, genre, image_url, `role`, title) VALUES (1, 2020, 1, '드라마', '가족, 멜로', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork1.png', '지선우역 (주연)', '부부의 세계'), (2, 2023, 1, '드라마', '드라마, 정치', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork2.png', '황도희역 (주연)', '퀸메이커'), (3, 2024, 1, '영화', '범죄', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork3.png', '심은조역 (주연)', '데드맨'); -INSERT INTO soullive.model_recent_advertisement (model_recent_advertisement_id, `year`, model_id, brand, image_url) +INSERT INTO test_jinwoo.model_recent_advertisement (model_recent_advertisement_id, `year`, model_id, brand, image_url) VALUES (1, 2019, 1, 'LG 프라엘', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement1.png'), (2, 2021, 1, '트렌비', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement2.png'), (3, 2024, 1, '우리은행 투체어스', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement3.png'); -- 모델 화제성 -INSERT INTO soullive.model_popularity (model_popularity_id,model_id,score_url,ai_comment,sns_url,search_url,brand_score_url) +INSERT INTO test_jinwoo.model_popularity (model_popularity_id,model_id,score_url,ai_comment,sns_url,search_url,brand_score_url) values (1,1,null,'최근 화제성에서는 다소 약한 모습을 보여주고 있지만 3040 남녀 모두에게 높은 인지도를 갖고 있고 앞으로 2개의 주연 활동을 앞두고 있어 더 큰 화제성을 갖을 것으로 예상됩니다.',null,null,null); -INSERT INTO soullive.model_popular_gender (gender_id, model_popularity_id, gender_type) +INSERT INTO test_jinwoo.model_popular_gender (gender_id, model_popularity_id, gender_type) values ('1','1','MALE'), ('2','1','FEMALE'); -INSERT INTO soullive.model_popular_age (age_id, model_popularity_id,age_type) +INSERT INTO test_jinwoo.model_popular_age (age_id, model_popularity_id,age_type) values (1,1,'THIRTY'), (2,1,'FORTY'), (3,1,'FIFTY'); -INSERT INTO soullive.model_scheduled_work (model_scheduled_work_id,image_url,model_popularity_id,year,category,title,is_main_actor,genre) +INSERT INTO test_jinwoo.model_scheduled_work (model_scheduled_work_id,image_url,model_popularity_id,year,category,title,is_main_actor,genre) values (1,null, 1, 2024, '방영 예정 영화','돌풍',true,'공포'), (2,null, 1, 2024, '방영 예정 영화','보통의 가족',true,'공포'); From ed1d2bbd66640fc869481472af10b5973ec4b264 Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 03:03:53 +0900 Subject: [PATCH 5/7] feat --- .../controller/ModelIssueController.java | 2 +- .../entity/model/issue/ModelNews.java | 4 +- src/main/resources/data.sql | 100 +++++++++++++++--- 3 files changed, 91 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java b/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java index c26735b..c67f1c9 100644 --- a/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java +++ b/src/main/java/com/backend/soullive_a/controller/ModelIssueController.java @@ -11,7 +11,7 @@ @RestController @RequiredArgsConstructor -@RequestMapping("model/issue") +@RequestMapping("api/model/issue") public class ModelIssueController { private final ModelIssueService modelIssueService; @GetMapping() diff --git a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java index 05c2880..775787a 100644 --- a/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java +++ b/src/main/java/com/backend/soullive_a/entity/model/issue/ModelNews.java @@ -13,7 +13,7 @@ public class ModelNews { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "issueId", nullable = false) + @Column(name = "MODEL_NEWS_ID", nullable = false) private Long id; @Column(name = "COMPANY", nullable = false) @@ -29,7 +29,7 @@ public class ModelNews { private String newsUrl; @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "MODEL_ISSUE", nullable = false) + @JoinColumn(name = "MODEL_ISSUE_ID", nullable = false) private ModelIssue modelIssue; } diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index bf2a40f..250a3bf 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -1,13 +1,21 @@ -- 유저 INSERT INTO test_jinwoo.user (user_id, password, phone_number) VALUES (1, 'password', '010-0000-0000'); --- 모델1 김희애 +-- 모델 INSERT INTO test_jinwoo.model (model_id, model_name, birth, age, job, info, agency, ai_rate, image_url) -VALUES (1, '김희애', '1967-04-23', '56세', '텔런트/영화배우', '', 'YG 엔터테인먼트', 4.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'); +VALUES + (1, '김희애', '1967-04-23', '56세', '텔런트/영화배우', '', 'YG 엔터테인먼트', 4.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'), + (2, '한지민', '1982-11-05', '41세', '배우', '', 'BH 엔터테인먼트', 3.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'), + (3, '김고은', '1991-07-02', '32세', '배우', '', 'BH 엔터테인먼트', 3.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'); -INSERT INTO test_jinwoo.model_introduction (model_id, model_introduction_id) VALUES (1, 1); +-- 모델소개 +INSERT INTO test_jinwoo.model_introduction (model_id, model_introduction_id) +VALUES + (1, 1), + (2, 2), + (3, 3); --- 모델1 김희애 모델소개 +-- 모델소개 > 모델이미지키워드 INSERT INTO test_jinwoo.model_image_keyword (model_image_keyword_id, model_id, keyword) VALUES (1, 1, '#세련됨'), @@ -16,35 +24,103 @@ VALUES (4, 1, '#우아한'), (5, 1, '#프리미엄'), (6, 1, '#럭셔리함'), - (7, 1, '#신뢰감'); + (7, 1, '#신뢰감'), + (8, 2, '#깨끗한'), + (9, 2, '#다재다능한'), + (10, 2, '#대중에게 친숙한'), + (11, 2, '#강인한'), + (12, 2, '#예술적인'), + (13, 2, '#섬세한'), + (14, 2, '#귀여운'), + (15, 3, '#세련됨'), + (16, 3, '#청순한'), + (17, 3, '#사랑스러운'), + (18, 3, '#자연스러운'), + (19, 3, '#예술적인'), + (20, 3, '#명량한'), + (21, 3, '#포근한'); +-- 모델소개 > 최근 작품 INSERT INTO test_jinwoo.model_recent_work (model_recent_work_id, `year`, model_id, category, genre, image_url, `role`, title) VALUES (1, 2020, 1, '드라마', '가족, 멜로', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork1.png', '지선우역 (주연)', '부부의 세계'), (2, 2023, 1, '드라마', '드라마, 정치', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork2.png', '황도희역 (주연)', '퀸메이커'), - (3, 2024, 1, '영화', '범죄', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork3.png', '심은조역 (주연)', '데드맨'); + (3, 2024, 1, '영화', '범죄', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork3.png', '심은조역 (주연)', '데드맨'), + (4, 2023, 2, '드라마', '판타지', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork1.png', '봉예분역 (주연)', '힙하게'), + (5, 2022, 2, '드라마', '가족', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork2.png', '이영옥역 (주연)', '우리들의 블루스'), + (6, 2022, 2, '드라마', 'SF', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork3.png', '차이후역 (주연)', '욘더'), + (7, 2024, 3, '영화', '스릴러', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork1.png', '이화림역 (주연)', '파묘'), + (8, 2022, 3, '영화', '뮤지컬', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork2.png', '설희역 (주연)', '영웅'), + (9, 2022, 3, '드라마', '미스터리', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork3.png', '오인주역 (주연)', '작은아씨들'); +-- 모델소개 > 최근 광고 활동 INSERT INTO test_jinwoo.model_recent_advertisement (model_recent_advertisement_id, `year`, model_id, brand, image_url) VALUES (1, 2019, 1, 'LG 프라엘', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement1.png'), (2, 2021, 1, '트렌비', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement2.png'), - (3, 2024, 1, '우리은행 투체어스', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement3.png'); + (3, 2024, 1, '우리은행 투체어스', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement3.png'), + (4, 2023, 2, '삼성화재', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement1.png'), + (5, 2022, 2, '탑스탭 세제', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement2.png'), + (6, 2020, 2, '동인비', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement3.png'), + (7, 2019, 3, '듀오랩', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement1.png'), + (8, 2021, 3, '디스커버리 익스페디션', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement2.png'), + (9, 2024, 3, '네스프레소', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement3.png'); -- 모델 화제성 INSERT INTO test_jinwoo.model_popularity (model_popularity_id,model_id,score_url,ai_comment,sns_url,search_url,brand_score_url) values - (1,1,null,'최근 화제성에서는 다소 약한 모습을 보여주고 있지만 3040 남녀 모두에게 높은 인지도를 갖고 있고 앞으로 2개의 주연 활동을 앞두고 있어 더 큰 화제성을 갖을 것으로 예상됩니다.',null,null,null); + (1,1,null,'최근 화제성에서는 다소 약한 모습을 보여주고 있지만 3040 남녀 모두에게 높은 인지도를 갖고 있고 앞으로 2개의 주연 활동을 앞두고 있어 더 큰 화제성을 갖을 것으로 예상됩니다.',null,null,null), + (2,2,null,'한지민은 20대부터 40대까지 넓은 연령층에게 선호되며 최근 화제성이 계속해서 높아지고 있는 모델입니다.',null,null,null), + (3,3,null,'김고은은 최근 개봉작 “파묘"로 큰 인기를 얻고 있으며 2030에게 연기력을 인정받으며 화제성이 높은 배우입니다.',null,null,null); + +-- 모델 화제성 선호 성별 INSERT INTO test_jinwoo.model_popular_gender (gender_id, model_popularity_id, gender_type) values ('1','1','MALE'), - ('2','1','FEMALE'); + ('2','1','FEMALE'), + ('3','2','MALE'), + ('4','2','FEMALE'), + ('5','3','MALE'), + ('6','3','FEMALE'); +-- 모델 화제성 선호연령대 INSERT INTO test_jinwoo.model_popular_age (age_id, model_popularity_id,age_type) values (1,1,'THIRTY'), (2,1,'FORTY'), - (3,1,'FIFTY'); + (3,1,'FIFTY'), + (4,2,'TWENTY'), + (5,2,'THIRTY'), + (6,2,'FORTY'), + (7,3,'TWENTY'), + (8,3,'THIRTY'); + +-- 모델 예정 주요 활동 INSERT INTO test_jinwoo.model_scheduled_work (model_scheduled_work_id,image_url,model_popularity_id,year,category,title,is_main_actor,genre) values - (1,null, 1, 2024, '방영 예정 영화','돌풍',true,'공포'), - (2,null, 1, 2024, '방영 예정 영화','보통의 가족',true,'공포'); + (1,null, 1, 2024, '방영 예정 영화','돌풍',true,'드라마'), + (2,null, 1, 2024, '방영 예정 영화','보통의 가족',true,'드라마'), + (3,null, 2, 2024, '방영 예정 드라마','인사하는 사이',true,'휴먼'), + (4,null, 2, 2024, '방영 예정 영화','보통의 가족',true,'공포'), + (5,null, 3, 2024, '방영 예정 영화','대도시의 사랑법',true,'로맨스'), + (6,null, 3, 2024, '방영 예정 드라마','은중과 상연',true,'로맨스'), + (7,null, 3, 2024, '방영 예정 드라마','자백의 대가',true,'가족'); + +-- 모델 부정이슈 +INSERT INTO test_jinwoo.model_issue (model_issue_id, model_id, score_url, ai_comment,crime) +VALUES + (1, 1, '', '2020년에 처음 알려진 김희애 남편의 횔령 혐의 피소가 있지만 사건의 전말이 정확하지 않고 김희애 배우 본인의 문제가 아니었기에 논란이 크지 않았습니다.', 0), + (2, 2, '', '한지민은 데뷔 이래로 큰 논란이나 사건이 없었으며 대중들에게 줄곧 바른 이미지를 유지해왔습니다.', 0), + (3, 3, '', '김고은은 범죄이력이 없으며 두드러지는 사건사고가 없었기 때문에 부정적인 이슈를 일으킬 가능성이 낮습니다.', 0); + +--모델 부정이슈 뉴스 +INSERT INTO test_jinwoo.model_news (model_news_id, model_issue_id, company, news_date, title ,news_url) +VALUES + (1, 1, '살구뉴스', '2022-12-18', '“잘나가다 남편 때문에" 김희애 남편, 회사 논란 밝혀지자 모두 경악', 'https://www.salgoonews.com/news/articleView.html?idxno=25726'), + (2, 1, '톱스타뉴스', '2022-08-05', '"부부의 세계" 김희애, 드라마 남편과 실제 남편 이찬진의 오버랩횡령 혐의 논란', 'https://www.topstarnews.net/news/articleView.html?idxno=773836'), + (3, 1, '스포츠동아', '2022-08-05', '"김희애 남편" 이찬진 전 포티스 대표, 수십억 횡령 혐의 피소', 'https://sports.donga.com/article/all/20200429/100861465/2'), + (4, 2, 'The fact', '2023-08-19', '한지민의 ''힙하게'', ''성추행 논란'' 완전히 못 지운 찜찜한 출발[TF초점]', 'https://www.topstarnews.net/news/articleView.html?idxno=773836'), + (5, 2, '금강일보', '2022-08-05', '이민기·한지민 주연 ‘힙하게’, 캐릭터 컨셉 논란', 'https://sports.donga.com/article/all/20200429/100861465/2'), + (6, 3, '톱스타뉴스', '2023-08-19', '"수지도 5만 원인데”...배우 김고은, 
팬미팅 가격 고가 논란', 'https://www.topstarnews.net/news/articleView.html?idxno=773836'), + (7, 3, '국제신문', '2019-05-05', '김고은 측 ''인터뷰 논란 악플 경고글'' 돌연 삭제...
이유는?', 'https://sports.donga.com/article/all/20200429/100861465/2'); + From a3ac232e187485ef4a9fdc4009ad243dfb1b5d39 Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 03:07:31 +0900 Subject: [PATCH 6/7] =?UTF-8?q?fix=20:=20#18=20=EC=95=88=EC=93=B0=EB=8A=94?= =?UTF-8?q?=20=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ModelController.java | 16 ---- .../ModelIntroductionController.java | 12 +-- .../service/ModelIntroductionService.java | 2 +- .../soullive_a/service/ModelService.java | 2 +- .../impl/ModelIntroductionServiceImpl.java | 95 ------------------- .../service/impl/ModelServiceImpl.java | 31 ------ 6 files changed, 3 insertions(+), 155 deletions(-) diff --git a/src/main/java/com/backend/soullive_a/controller/ModelController.java b/src/main/java/com/backend/soullive_a/controller/ModelController.java index 1be8a7d..cacab57 100644 --- a/src/main/java/com/backend/soullive_a/controller/ModelController.java +++ b/src/main/java/com/backend/soullive_a/controller/ModelController.java @@ -30,20 +30,4 @@ public BaseResponse getModel(@RequestParam String modelName) { } - /** - * 모델 등록 api - * @param request - * @return - */ - @PostMapping("") - public BaseResponse createModel(@RequestBody @Valid ModelRequest request) { - System.out.println("@"); - return BaseResponse.builder() - .isSuccess(true) - .code(200) - .message("모델 생성에 성공했습니다.") - .data(modelService.createModel(request)) - .build(); - - } } diff --git a/src/main/java/com/backend/soullive_a/controller/ModelIntroductionController.java b/src/main/java/com/backend/soullive_a/controller/ModelIntroductionController.java index 8e1b4bd..c65347d 100644 --- a/src/main/java/com/backend/soullive_a/controller/ModelIntroductionController.java +++ b/src/main/java/com/backend/soullive_a/controller/ModelIntroductionController.java @@ -33,17 +33,7 @@ public BaseResponse getModelIntroduction(@RequestPara } -// @PostMapping("/{modelId}") -// public BaseResponse createModelIntroduction( -// @PathVariable Long modelId, -// @RequestBody @Valid ModelIntroduceRequest request) { -// return BaseResponse.builder() -// .isSuccess(true) -// .code(2006) -// .message("모델소개 정보 생성에 성공했습니다.") -// .data(modelIntroductionService.createModelIntroduction(request, modelId)) -// .build(); -// } + } diff --git a/src/main/java/com/backend/soullive_a/service/ModelIntroductionService.java b/src/main/java/com/backend/soullive_a/service/ModelIntroductionService.java index c648ce2..2dcc30b 100644 --- a/src/main/java/com/backend/soullive_a/service/ModelIntroductionService.java +++ b/src/main/java/com/backend/soullive_a/service/ModelIntroductionService.java @@ -9,6 +9,6 @@ public interface ModelIntroductionService { public ModelIntroductionResponse getModelIntroduction(String modelName); - public ModelIntroductionResponse createModelIntroduction(ModelIntroduceRequest request, Long modelId); + } diff --git a/src/main/java/com/backend/soullive_a/service/ModelService.java b/src/main/java/com/backend/soullive_a/service/ModelService.java index 05d1757..c79d094 100644 --- a/src/main/java/com/backend/soullive_a/service/ModelService.java +++ b/src/main/java/com/backend/soullive_a/service/ModelService.java @@ -6,5 +6,5 @@ public interface ModelService { public ModelResponse getModel(String modelName ); - public ModelResponse createModel(ModelRequest request); + } diff --git a/src/main/java/com/backend/soullive_a/service/impl/ModelIntroductionServiceImpl.java b/src/main/java/com/backend/soullive_a/service/impl/ModelIntroductionServiceImpl.java index 3881e22..3e2427b 100644 --- a/src/main/java/com/backend/soullive_a/service/impl/ModelIntroductionServiceImpl.java +++ b/src/main/java/com/backend/soullive_a/service/impl/ModelIntroductionServiceImpl.java @@ -93,101 +93,6 @@ public ModelIntroductionResponse getModelIntroduction(String modelName) { } - /** - * 모델소개 생성 서비스 로직 - * - * @param modelId - * @return - */ - @Override - @Transactional - public ModelIntroductionResponse createModelIntroduction(ModelIntroduceRequest request, Long modelId) { - List modelImageKeywordList = new ArrayList<>(); - List modelRecentWorkList = new ArrayList<>(); - List modelRecentAdvertisementList = new ArrayList<>(); - - Model model = modelRepository.findById(modelId) - .orElseThrow(() -> new NotFoundUserException()); - - // ModelIntroduction 엔티티 저장 - modelIntroductionRepository.save( - ModelIntroduction.builder() - .model(model) - .build() - ); - - // ModelImageKeyword 엔티티 각각 저장 - for (String keyword : request.keywords()) { - ModelImageKeyword modelImageKeyword = ModelImageKeyword.builder() - .model(model) - .keyword(keyword) - .build(); - - modelImageKeywordRepository.save(modelImageKeyword); - - // ModelImageKeywordResponse (String) 생성 - modelImageKeywordList.add(keyword); - - } - - // ModelRecentWorkRequest 엔티티 각각 저장 - for (ModelRecentWorkRequest modelRecentWorkRequest : request.modelRecentWorks()) { - ModelRecentWork modelRecentWork = ModelRecentWork.builder() - .imageUrl(modelRecentWorkRequest.imageUrl()) - .year(modelRecentWorkRequest.year()) - .category(modelRecentWorkRequest.category()) - .title(modelRecentWorkRequest.title()) - .genre(modelRecentWorkRequest.genre()) - .role(modelRecentWorkRequest.role()) - .model(model) - .build(); - - modelRecentWorkRepository.save(modelRecentWork); - - // ModelRecentWorkResponse 생성 - ModelRecentWorkResponse modelRecentWorkResponse = ModelRecentWorkResponse.builder() - .imageUrl(modelRecentWorkRequest.imageUrl()) - .year(modelRecentWorkRequest.year()) - .category(modelRecentWorkRequest.category()) - .title(modelRecentWorkRequest.title()) - .genre(modelRecentWorkRequest.genre()) - .role(modelRecentWorkRequest.role()) - .build(); - - modelRecentWorkList.add(modelRecentWorkResponse); - } - - // modelRecentAdvertisementRepository 엔티티 각각 저장 - for (ModelRecentAdvertisementRequest modelRecentAdvertisementRequest : request.modelRecentAdvertisements()) { - ModelRecentAdvertisement modelRecentAdvertisement = ModelRecentAdvertisement.builder() - .imageUrl(modelRecentAdvertisementRequest.imageUrl()) - .year(modelRecentAdvertisementRequest.year()) - .brand(modelRecentAdvertisementRequest.brand()) - .model(model) - .build(); - - modelRecentAdvertisementRepository.save(modelRecentAdvertisement); - - // ModelRecentAdvertisementResponse 생성 - ModelRecentAdvertisementResponse modelRecentAdvertisementResponse = ModelRecentAdvertisementResponse.builder() - .imageUrl(modelRecentAdvertisementRequest.imageUrl()) - .year(modelRecentAdvertisementRequest.year()) - .brand(modelRecentAdvertisementRequest.brand()) - .build(); - - modelRecentAdvertisementList.add(modelRecentAdvertisementResponse); - } - - //ModelIntroductionResponse 생성 - - return ModelIntroductionResponse.builder() - .modelImageKeywords(modelImageKeywordList) - .modelRecentWorks(modelRecentWorkList) - .modelRecentAdvertisements(modelRecentAdvertisementList) - .build(); - - } - } diff --git a/src/main/java/com/backend/soullive_a/service/impl/ModelServiceImpl.java b/src/main/java/com/backend/soullive_a/service/impl/ModelServiceImpl.java index 58ec9fa..ff67eb1 100644 --- a/src/main/java/com/backend/soullive_a/service/impl/ModelServiceImpl.java +++ b/src/main/java/com/backend/soullive_a/service/impl/ModelServiceImpl.java @@ -37,37 +37,6 @@ public ModelResponse getModel(String modelName) { .build(); } - @Override - @Transactional - public ModelResponse createModel(ModelRequest request) { - // 중복 검사 로직 추가 - - Model model = modelRepository.save(Model.builder() - .imageUrl(request.imageUrl()) - - .modelName(request.modelName()) - .birth(request.birth()) - .age(request.age()) - - .job(request.job()) - .info(request.info()) - .agency(request.agency()) - .aiRate(request.aiRate()) - .build()); - - return ModelResponse.builder() - .modelId(model.getId()) - - .imageUrl(model.getImageUrl()) - .modelName(model.getModelName()) - .birth(model.getBirth()) - .age(model.getAge()) - .job(model.getJob()) - .info(model.getInfo()) - .agency(model.getAgency()) - .aiRate(model.getAiRate()) - .build(); - } } From 9e936d311891ec3b308a7719efd8653b98dcd5f7 Mon Sep 17 00:00:00 2001 From: j2noo Date: Thu, 7 Mar 2024 03:10:21 +0900 Subject: [PATCH 7/7] =?UTF-8?q?fix=20:=20#29=20data.sql=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=EB=B2=A0=EC=9D=B4=EC=8A=A4=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/data.sql | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 250a3bf..6359b98 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -1,22 +1,22 @@ -- 유저 -INSERT INTO test_jinwoo.user (user_id, password, phone_number) VALUES (1, 'password', '010-0000-0000'); +INSERT INTO soullive.user (user_id, password, phone_number) VALUES (1, 'password', '010-0000-0000'); -- 모델 -INSERT INTO test_jinwoo.model (model_id, model_name, birth, age, job, info, agency, ai_rate, image_url) +INSERT INTO soullive.model (model_id, model_name, birth, age, job, info, agency, ai_rate, image_url) VALUES (1, '김희애', '1967-04-23', '56세', '텔런트/영화배우', '', 'YG 엔터테인먼트', 4.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'), (2, '한지민', '1982-11-05', '41세', '배우', '', 'BH 엔터테인먼트', 3.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'), (3, '김고은', '1991-07-02', '32세', '배우', '', 'BH 엔터테인먼트', 3.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_profile.png'); -- 모델소개 -INSERT INTO test_jinwoo.model_introduction (model_id, model_introduction_id) +INSERT INTO soullive.model_introduction (model_id, model_introduction_id) VALUES (1, 1), (2, 2), (3, 3); -- 모델소개 > 모델이미지키워드 -INSERT INTO test_jinwoo.model_image_keyword (model_image_keyword_id, model_id, keyword) +INSERT INTO soullive.model_image_keyword (model_image_keyword_id, model_id, keyword) VALUES (1, 1, '#세련됨'), (2, 1, '#프로페셔널'), @@ -41,7 +41,7 @@ VALUES (21, 3, '#포근한'); -- 모델소개 > 최근 작품 -INSERT INTO test_jinwoo.model_recent_work (model_recent_work_id, `year`, model_id, category, genre, image_url, `role`, title) +INSERT INTO soullive.model_recent_work (model_recent_work_id, `year`, model_id, category, genre, image_url, `role`, title) VALUES (1, 2020, 1, '드라마', '가족, 멜로', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork1.png', '지선우역 (주연)', '부부의 세계'), (2, 2023, 1, '드라마', '드라마, 정치', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork2.png', '황도희역 (주연)', '퀸메이커'), @@ -54,7 +54,7 @@ VALUES (9, 2022, 3, '드라마', '미스터리', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentwork3.png', '오인주역 (주연)', '작은아씨들'); -- 모델소개 > 최근 광고 활동 -INSERT INTO test_jinwoo.model_recent_advertisement (model_recent_advertisement_id, `year`, model_id, brand, image_url) +INSERT INTO soullive.model_recent_advertisement (model_recent_advertisement_id, `year`, model_id, brand, image_url) VALUES (1, 2019, 1, 'LG 프라엘', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement1.png'), (2, 2021, 1, '트렌비', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement2.png'), @@ -67,14 +67,14 @@ VALUES (9, 2024, 3, '네스프레소', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_recentadvertisement3.png'); -- 모델 화제성 -INSERT INTO test_jinwoo.model_popularity (model_popularity_id,model_id,score_url,ai_comment,sns_url,search_url,brand_score_url) +INSERT INTO soullive.model_popularity (model_popularity_id,model_id,score_url,ai_comment,sns_url,search_url,brand_score_url) values (1,1,null,'최근 화제성에서는 다소 약한 모습을 보여주고 있지만 3040 남녀 모두에게 높은 인지도를 갖고 있고 앞으로 2개의 주연 활동을 앞두고 있어 더 큰 화제성을 갖을 것으로 예상됩니다.',null,null,null), (2,2,null,'한지민은 20대부터 40대까지 넓은 연령층에게 선호되며 최근 화제성이 계속해서 높아지고 있는 모델입니다.',null,null,null), (3,3,null,'김고은은 최근 개봉작 “파묘"로 큰 인기를 얻고 있으며 2030에게 연기력을 인정받으며 화제성이 높은 배우입니다.',null,null,null); -- 모델 화제성 선호 성별 -INSERT INTO test_jinwoo.model_popular_gender (gender_id, model_popularity_id, gender_type) +INSERT INTO soullive.model_popular_gender (gender_id, model_popularity_id, gender_type) values ('1','1','MALE'), ('2','1','FEMALE'), @@ -84,7 +84,7 @@ values ('6','3','FEMALE'); -- 모델 화제성 선호연령대 -INSERT INTO test_jinwoo.model_popular_age (age_id, model_popularity_id,age_type) +INSERT INTO soullive.model_popular_age (age_id, model_popularity_id,age_type) values (1,1,'THIRTY'), (2,1,'FORTY'), @@ -96,7 +96,7 @@ values (8,3,'THIRTY'); -- 모델 예정 주요 활동 -INSERT INTO test_jinwoo.model_scheduled_work (model_scheduled_work_id,image_url,model_popularity_id,year,category,title,is_main_actor,genre) +INSERT INTO soullive.model_scheduled_work (model_scheduled_work_id,image_url,model_popularity_id,year,category,title,is_main_actor,genre) values (1,null, 1, 2024, '방영 예정 영화','돌풍',true,'드라마'), (2,null, 1, 2024, '방영 예정 영화','보통의 가족',true,'드라마'), @@ -107,14 +107,14 @@ values (7,null, 3, 2024, '방영 예정 드라마','자백의 대가',true,'가족'); -- 모델 부정이슈 -INSERT INTO test_jinwoo.model_issue (model_issue_id, model_id, score_url, ai_comment,crime) +INSERT INTO soullive.model_issue (model_issue_id, model_id, score_url, ai_comment,crime) VALUES (1, 1, '', '2020년에 처음 알려진 김희애 남편의 횔령 혐의 피소가 있지만 사건의 전말이 정확하지 않고 김희애 배우 본인의 문제가 아니었기에 논란이 크지 않았습니다.', 0), (2, 2, '', '한지민은 데뷔 이래로 큰 논란이나 사건이 없었으며 대중들에게 줄곧 바른 이미지를 유지해왔습니다.', 0), (3, 3, '', '김고은은 범죄이력이 없으며 두드러지는 사건사고가 없었기 때문에 부정적인 이슈를 일으킬 가능성이 낮습니다.', 0); --모델 부정이슈 뉴스 -INSERT INTO test_jinwoo.model_news (model_news_id, model_issue_id, company, news_date, title ,news_url) +INSERT INTO soullive.model_news (model_news_id, model_issue_id, company, news_date, title ,news_url) VALUES (1, 1, '살구뉴스', '2022-12-18', '“잘나가다 남편 때문에" 김희애 남편, 회사 논란 밝혀지자 모두 경악', 'https://www.salgoonews.com/news/articleView.html?idxno=25726'), (2, 1, '톱스타뉴스', '2022-08-05', '"부부의 세계" 김희애, 드라마 남편과 실제 남편 이찬진의 오버랩횡령 혐의 논란', 'https://www.topstarnews.net/news/articleView.html?idxno=773836'),