From ac20181099c31678a4ee343d6e367b945310d39b Mon Sep 17 00:00:00 2001 From: j2noo Date: Sun, 3 Mar 2024 02:39:02 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20#11-=EB=AA=A8=EB=8D=B8=EC=86=8C?= =?UTF-8?q?=EA=B0=9C=20=ED=85=8C=EC=9D=B4=EB=B8=94=20=EB=B0=8F=20=ED=95=98?= =?UTF-8?q?=EC=9C=84=20=ED=85=8C=EC=9D=B4=EB=B8=94=203=EA=B0=9C=20?= =?UTF-8?q?=EC=97=94=ED=8B=B0=ED=8B=B0=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../soullive_a/{domain => entity}/Model.java | 20 ++++++------- .../soullive_a/entity/ModelImageKeyword.java | 29 +++++++++++++++++++ .../soullive_a/entity/ModelIntroduction.java | 22 ++++++++++++++ .../entity/ModelRecentAdvertisement.java | 20 +++++++++++++ .../soullive_a/entity/ModelRecentWork.java | 27 +++++++++++++++++ 5 files changed, 107 insertions(+), 11 deletions(-) rename src/main/java/com/backend/soullive_a/{domain => entity}/Model.java (55%) create mode 100644 src/main/java/com/backend/soullive_a/entity/ModelImageKeyword.java create mode 100644 src/main/java/com/backend/soullive_a/entity/ModelIntroduction.java create mode 100644 src/main/java/com/backend/soullive_a/entity/ModelRecentAdvertisement.java create mode 100644 src/main/java/com/backend/soullive_a/entity/ModelRecentWork.java diff --git a/src/main/java/com/backend/soullive_a/domain/Model.java b/src/main/java/com/backend/soullive_a/entity/Model.java similarity index 55% rename from src/main/java/com/backend/soullive_a/domain/Model.java rename to src/main/java/com/backend/soullive_a/entity/Model.java index 5003624..d1418fd 100644 --- a/src/main/java/com/backend/soullive_a/domain/Model.java +++ b/src/main/java/com/backend/soullive_a/entity/Model.java @@ -1,17 +1,15 @@ -package com.backend.soullive_a.domain; +package com.backend.soullive_a.entity; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; -import lombok.AccessLevel; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; +import lombok.*; @Entity @Getter @Builder +@AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Model { @Id @@ -21,11 +19,11 @@ public class Model { private String modelName; private Integer age; - @Builder - public Model(Long modelId,String modelName,Integer age) { - this.modelId = modelId; - this.modelName = modelName; - this.age = age; - } +// @Builder +// public Model(Long modelId,String modelName,Integer age) { +// this.modelId = modelId; +// this.modelName = modelName; +// this.age = age; +// } } diff --git a/src/main/java/com/backend/soullive_a/entity/ModelImageKeyword.java b/src/main/java/com/backend/soullive_a/entity/ModelImageKeyword.java new file mode 100644 index 0000000..cd4eed0 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/ModelImageKeyword.java @@ -0,0 +1,29 @@ +package com.backend.soullive_a.entity; + +import jakarta.persistence.*; +import lombok.*; + +@Entity +@Getter +@Builder +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) + +public class ModelImageKeyword { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long modelImageKeywordId; + + @ManyToOne + @JoinColumn(name = "model_id") //비식별인데.. + private Model model; + private String keyword; + + +// @Builder +// public ModelImageKeyword(Model model, String keyword) { +// this.model = model; +// this.keyword = keyword; +// } +} diff --git a/src/main/java/com/backend/soullive_a/entity/ModelIntroduction.java b/src/main/java/com/backend/soullive_a/entity/ModelIntroduction.java new file mode 100644 index 0000000..d4bd046 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/ModelIntroduction.java @@ -0,0 +1,22 @@ +package com.backend.soullive_a.entity; + +import jakarta.persistence.*; +import lombok.*; + +@Entity +@Getter +@Builder +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class ModelIntroduction { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @OneToOne + @JoinColumn(name = "model_id") //식별 + private Model model; + +// @Builder +// public ModelIntroduction(Model model) { +// this.model = model; +// } +} diff --git a/src/main/java/com/backend/soullive_a/entity/ModelRecentAdvertisement.java b/src/main/java/com/backend/soullive_a/entity/ModelRecentAdvertisement.java new file mode 100644 index 0000000..eaec743 --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/ModelRecentAdvertisement.java @@ -0,0 +1,20 @@ +package com.backend.soullive_a.entity; + +import jakarta.persistence.*; +import lombok.*; + +@Entity +@Getter +@Builder +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) + +public class ModelRecentAdvertisement { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long modelRecentAdvertisementId; + + @ManyToOne + @JoinColumn(name = "model_id") + private Model model; +} diff --git a/src/main/java/com/backend/soullive_a/entity/ModelRecentWork.java b/src/main/java/com/backend/soullive_a/entity/ModelRecentWork.java new file mode 100644 index 0000000..af0079e --- /dev/null +++ b/src/main/java/com/backend/soullive_a/entity/ModelRecentWork.java @@ -0,0 +1,27 @@ +package com.backend.soullive_a.entity; + +import jakarta.persistence.*; +import lombok.*; + +@Entity +@Getter +@Builder +@AllArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) + +public class ModelRecentWork { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long modelRecentWorkId; + + private Integer year; + private String category; + private String title; + private String genre; + private String role; + private Boolean isMainActor; + + @ManyToOne + @JoinColumn(name = "model_id") + private Model model; +}