From cfd577c2a382e73268382553e4d2c19c1e38ea39 Mon Sep 17 00:00:00 2001 From: j2noo Date: Fri, 8 Mar 2024 03:38:58 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20#34=20=EB=AA=A8=EB=8D=B8=EC=A0=81?= =?UTF-8?q?=ED=95=A9=EB=8F=84=20=EC=97=94=ED=8B=B0=ED=8B=B0=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/model/fitness/ModelFitness.java | 27 +++++++++++++++++++ src/main/resources/data.sql | 24 ++++++++--------- 2 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 src/main/java/com/backend/soullive_a/entity/model/fitness/ModelFitness.java diff --git a/src/main/java/com/backend/soullive_a/entity/model/fitness/ModelFitness.java b/src/main/java/com/backend/soullive_a/entity/model/fitness/ModelFitness.java new file mode 100644 index 0000000..261e761 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/model/fitness/ModelFitness.java @@ -0,0 +1,27 @@ +package com.backend.soullive_a.entity.model.fitness; + +import com.backend.soullive_a.entity.model.ProductModel; +import jakarta.persistence.*; +import lombok.*; + +@Entity +@Getter +@Builder +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class ModelFitness { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "MODEL_FITENSS_ID", nullable = false) + private Long id; + + @Column(name = "SCORE_URL", nullable = false) + private String scoreUrl; + + @Column(name = "AI_COMMENT", nullable = false) + private String aiComment; + + @OneToOne + @JoinColumn(name = "PRODUCT_MODEL_ID") + private ProductModel productModel; +} diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 744e7a5..0ff2c7c 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -1,8 +1,8 @@ -- 유저 -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'); -- 모델 -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.png'), (2, '한지민', '1982-11-05', '41세', '배우', '', 'BH 엔터테인먼트', 3.0, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/hanjimin.png'), @@ -23,14 +23,14 @@ VALUES -- 모델소개 -INSERT INTO soullive.model_introduction (model_id, model_introduction_id) +INSERT INTO test_jinwoo.model_introduction (model_id, model_introduction_id) VALUES (1, 1), (2, 2), (3, 3); -- 모델소개 > 모델이미지키워드 -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, '#프로페셔널'), @@ -55,7 +55,7 @@ VALUES (21, 3, '#포근한'); -- 모델소개 > 최근 작품 -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, 2024, 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', '황도희역 (주연)', '퀸메이커'), @@ -70,7 +70,7 @@ VALUES (9, 2022, 3, '드라마', '미스터리', 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/goeun_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, 2024, 1, '우리은행 투체어스', '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'), @@ -85,7 +85,7 @@ VALUES (9, 2024, 3, '네스프레소', '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,'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_popularity_score.png','최근 화제성에서는 다소 약한 모습을 보여주고 있지만 3040 남녀 모두에게 높은 인지도를 갖고 있고 앞으로 2개의 주연 활동을 앞두고 있어 더 큰 화제성을 갖을 것으로 예상됩니다.' ,'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_popularity_sns.png','https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_search.png','https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_popularity_brand.png'), @@ -95,7 +95,7 @@ values ,'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/goeun_popularity_sns.png','https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/goeun_popularity_search.png','https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/goeun_popularity_brand.png'); -- 모델 화제성 선호 성별 -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'), @@ -107,7 +107,7 @@ values ('6','3','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'), @@ -121,7 +121,7 @@ values (8,3,'THIRTY'); -- 모델 예정 주요 활동 -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,'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_scheduled_work1.png', 1, 2024, '방영 예정 영화','돌풍',true,'드라마'), (2,'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_scheduled_work2.png', 1, 2024, '방영 예정 영화','보통의 가족',true,'드라마'), @@ -133,14 +133,14 @@ values (6,'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/goeun_scheduled_work1.png', 3, 2024, '방영 예정 드라마','자백의 대가',true,'가족'); -- 모델 부정이슈 -INSERT INTO soullive.model_issue (model_issue_id, model_id, score_url, ai_comment,crime) +INSERT INTO test_jinwoo.model_issue (model_issue_id, model_id, score_url, ai_comment,crime) VALUES (1, 1, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/heeae_issue.png', '2020년에 처음 알려진 김희애 남편의 횔령 혐의 피소가 있지만 사건의 전말이 정확하지 않고 김희애 배우 본인의 문제가 아니었기에 논란이 크지 않았습니다.', 0), (2, 2, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/jimin_issue.png', '한지민은 데뷔 이래로 큰 논란이나 사건이 없었으며 대중들에게 줄곧 바른 이미지를 유지해왔습니다.', 0), (3, 3, 'https://soullive-bucket.s3.ap-northeast-2.amazonaws.com/goeun_issue.png', '김고은은 범죄이력이 없으며 두드러지는 사건사고가 없었기 때문에 부정적인 이슈를 일으킬 가능성이 낮습니다.', 0); --모델 부정이슈 뉴스 -INSERT INTO soullive.model_news (model_news_id, model_issue_id, company, news_date, title ,news_url) +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'),