From 7d1e91a64b8b55df400a6a08602a7dbb63eacf2b Mon Sep 17 00:00:00 2001 From: devholic22 Date: Tue, 13 Feb 2024 17:25:17 +0900 Subject: [PATCH 001/225] =?UTF-8?q?feat:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EC=86=8D=EC=84=B1=20=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 취미 (Hobbies, Hobby) 정의 - 나의 스타일 (Styles, Style) 정의 - 프로필 사진 (Images, Image) 정의 --- .../com/atwoz/member/domain/member/Member.java | 13 +++++++++++++ .../atwoz/member/domain/profile/hobby/Hobbies.java | 14 ++++++++++++++ .../atwoz/member/domain/profile/hobby/Hobby.java | 13 +++++++++++++ .../atwoz/member/domain/profile/image/Image.java | 13 +++++++++++++ .../atwoz/member/domain/profile/image/Images.java | 14 ++++++++++++++ .../atwoz/member/domain/profile/style/Style.java | 13 +++++++++++++ .../atwoz/member/domain/profile/style/Styles.java | 14 ++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 src/main/java/com/atwoz/member/domain/profile/hobby/Hobbies.java create mode 100644 src/main/java/com/atwoz/member/domain/profile/hobby/Hobby.java create mode 100644 src/main/java/com/atwoz/member/domain/profile/image/Image.java create mode 100644 src/main/java/com/atwoz/member/domain/profile/image/Images.java create mode 100644 src/main/java/com/atwoz/member/domain/profile/style/Style.java create mode 100644 src/main/java/com/atwoz/member/domain/profile/style/Styles.java diff --git a/src/main/java/com/atwoz/member/domain/member/Member.java b/src/main/java/com/atwoz/member/domain/member/Member.java index fa30b5e7..8e0099fa 100644 --- a/src/main/java/com/atwoz/member/domain/member/Member.java +++ b/src/main/java/com/atwoz/member/domain/member/Member.java @@ -1,7 +1,11 @@ package com.atwoz.member.domain.member; import com.atwoz.global.domain.BaseEntity; +import com.atwoz.member.domain.profile.hobby.Hobbies; +import com.atwoz.member.domain.profile.image.Images; +import com.atwoz.member.domain.profile.style.Styles; import jakarta.persistence.Column; +import jakarta.persistence.Embedded; import jakarta.persistence.Entity; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; @@ -37,6 +41,15 @@ public class Member extends BaseEntity { @Column(nullable = false) private MemberRole memberRole; + @Embedded + private Hobbies hobbies; + + @Embedded + private Styles styles; + + @Embedded + private Images images; + public boolean isAdmin() { return this.memberRole.isAdministrator(); } diff --git a/src/main/java/com/atwoz/member/domain/profile/hobby/Hobbies.java b/src/main/java/com/atwoz/member/domain/profile/hobby/Hobbies.java new file mode 100644 index 00000000..b82132fb --- /dev/null +++ b/src/main/java/com/atwoz/member/domain/profile/hobby/Hobbies.java @@ -0,0 +1,14 @@ +package com.atwoz.member.domain.profile.hobby; + +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embeddable; +import lombok.Getter; +import java.util.List; + +@Getter +@Embeddable +public class Hobbies { + + @ElementCollection + private List hobbies; +} diff --git a/src/main/java/com/atwoz/member/domain/profile/hobby/Hobby.java b/src/main/java/com/atwoz/member/domain/profile/hobby/Hobby.java new file mode 100644 index 00000000..661b7cd4 --- /dev/null +++ b/src/main/java/com/atwoz/member/domain/profile/hobby/Hobby.java @@ -0,0 +1,13 @@ +package com.atwoz.member.domain.profile.hobby; + +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import lombok.Getter; + +@Getter +@Embeddable +public class Hobby { + + @Column(nullable = false) + private String hobby; +} diff --git a/src/main/java/com/atwoz/member/domain/profile/image/Image.java b/src/main/java/com/atwoz/member/domain/profile/image/Image.java new file mode 100644 index 00000000..2687f8a1 --- /dev/null +++ b/src/main/java/com/atwoz/member/domain/profile/image/Image.java @@ -0,0 +1,13 @@ +package com.atwoz.member.domain.profile.image; + +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import lombok.Getter; + +@Getter +@Embeddable +public class Image { + + @Column(nullable = false) + private String url; +} diff --git a/src/main/java/com/atwoz/member/domain/profile/image/Images.java b/src/main/java/com/atwoz/member/domain/profile/image/Images.java new file mode 100644 index 00000000..7c73c8c5 --- /dev/null +++ b/src/main/java/com/atwoz/member/domain/profile/image/Images.java @@ -0,0 +1,14 @@ +package com.atwoz.member.domain.profile.image; + +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embeddable; +import lombok.Getter; +import java.util.List; + +@Getter +@Embeddable +public class Images { + + @ElementCollection + private List images; +} diff --git a/src/main/java/com/atwoz/member/domain/profile/style/Style.java b/src/main/java/com/atwoz/member/domain/profile/style/Style.java new file mode 100644 index 00000000..1f036fc2 --- /dev/null +++ b/src/main/java/com/atwoz/member/domain/profile/style/Style.java @@ -0,0 +1,13 @@ +package com.atwoz.member.domain.profile.style; + +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import lombok.Getter; + +@Getter +@Embeddable +public class Style { + + @Column(nullable = false) + private String style; +} diff --git a/src/main/java/com/atwoz/member/domain/profile/style/Styles.java b/src/main/java/com/atwoz/member/domain/profile/style/Styles.java new file mode 100644 index 00000000..709fa9b5 --- /dev/null +++ b/src/main/java/com/atwoz/member/domain/profile/style/Styles.java @@ -0,0 +1,14 @@ +package com.atwoz.member.domain.profile.style; + +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Embeddable; +import lombok.Getter; +import java.util.List; + +@Getter +@Embeddable +public class Styles { + + @ElementCollection + private List