From 90c8906606bc67a5df42ffec195b61844bd19af9 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 12 Oct 2023 10:47:06 +0900 Subject: [PATCH 1/3] =?UTF-8?q?:memo:=20User=20=EC=97=94=ED=8B=B0=ED=8B=B0?= =?UTF-8?q?=EC=97=90=20point=20=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/andreas311/miso/domain/user/entity/User.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/user/entity/User.kt b/src/main/kotlin/andreas311/miso/domain/user/entity/User.kt index 7f462075..a3815a3e 100644 --- a/src/main/kotlin/andreas311/miso/domain/user/entity/User.kt +++ b/src/main/kotlin/andreas311/miso/domain/user/entity/User.kt @@ -22,6 +22,8 @@ class User( @Column(name = "password") val password: String, + var point: Int = 0, + @Enumerated(EnumType.STRING) @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "Role", joinColumns = [JoinColumn(name = "user_id")]) From baf895bdaddab3af8304eedd8f8ee4e0d6191939 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 12 Oct 2023 10:47:24 +0900 Subject: [PATCH 2/3] =?UTF-8?q?:memo:=20AuthConverter=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=EC=97=90=20point=20=ED=95=84=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../andreas311/miso/domain/auth/util/impl/AuthConverterImpl.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/andreas311/miso/domain/auth/util/impl/AuthConverterImpl.kt b/src/main/kotlin/andreas311/miso/domain/auth/util/impl/AuthConverterImpl.kt index 4c6efa78..0445dea0 100644 --- a/src/main/kotlin/andreas311/miso/domain/auth/util/impl/AuthConverterImpl.kt +++ b/src/main/kotlin/andreas311/miso/domain/auth/util/impl/AuthConverterImpl.kt @@ -24,6 +24,7 @@ class AuthConverterImpl : AuthConverter { id = UUID.randomUUID(), email = user.email, password = user.password, + point = 0, role = mutableListOf(Role.ROLE_USER) ) @@ -32,6 +33,7 @@ class AuthConverterImpl : AuthConverter { id = UUID.randomUUID(), email = user.email, password = user.password, + point = 0, role = mutableListOf(Role.ROLE_ADMIN) ) From 68809b64dca00ec8031c9bf65a600673a8014c2c Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Thu, 12 Oct 2023 10:48:15 +0900 Subject: [PATCH 3/3] =?UTF-8?q?:memo:=20Item=20=EC=97=94=ED=8B=B0=ED=8B=B0?= =?UTF-8?q?=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miso/domain/item/entity/Item.kt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/main/kotlin/andreas311/miso/domain/item/entity/Item.kt diff --git a/src/main/kotlin/andreas311/miso/domain/item/entity/Item.kt b/src/main/kotlin/andreas311/miso/domain/item/entity/Item.kt new file mode 100644 index 00000000..a07a236c --- /dev/null +++ b/src/main/kotlin/andreas311/miso/domain/item/entity/Item.kt @@ -0,0 +1,26 @@ +package andreas311.miso.domain.item.entity + +import org.hibernate.annotations.DynamicUpdate +import javax.persistence.* + +@Entity +@DynamicUpdate +class Item( + + @Id + @Column(name = "shop_id") + @GeneratedValue(strategy = GenerationType.IDENTITY) + val id: Long, + + @Column(name = "price") + val price: Int, + + @Column(name = "name") + val name: String, + + @Column(name = "content") + val content: String, + + @Column(name = "image_url") + val imageUrl: String +) \ No newline at end of file