From 551fb563720f17b03045a360baee8e9469906e8a Mon Sep 17 00:00:00 2001 From: Umjiseung <127853946+Umjiseung@users.noreply.github.com> Date: Sat, 13 Apr 2024 20:06:00 +0900 Subject: [PATCH] =?UTF-8?q?add=20::=20Week=20=EC=9E=84=EB=B2=A0=EB=93=9C?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/v2/domain/goal/entity/Goal.java | 3 ++ .../server/v2/domain/goal/entity/Week.java | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/main/java/com/mindway/server/v2/domain/goal/entity/Week.java diff --git a/src/main/java/com/mindway/server/v2/domain/goal/entity/Goal.java b/src/main/java/com/mindway/server/v2/domain/goal/entity/Goal.java index eea3e39..9b13159 100644 --- a/src/main/java/com/mindway/server/v2/domain/goal/entity/Goal.java +++ b/src/main/java/com/mindway/server/v2/domain/goal/entity/Goal.java @@ -24,6 +24,9 @@ public class Goal { private LocalDate ended_at; + @Embedded + private Week week_count; + private Long goal_count; @ManyToOne diff --git a/src/main/java/com/mindway/server/v2/domain/goal/entity/Week.java b/src/main/java/com/mindway/server/v2/domain/goal/entity/Week.java new file mode 100644 index 0000000..d15b100 --- /dev/null +++ b/src/main/java/com/mindway/server/v2/domain/goal/entity/Week.java @@ -0,0 +1,34 @@ +package com.mindway.server.v2.domain.goal.entity; + +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.MappedSuperclass; +import lombok.NoArgsConstructor; + +@Embeddable +@MappedSuperclass +@NoArgsConstructor +public class Week { + + @Column(length = 3) + private Long mon; + + @Column(length = 3) + private Long tue; + + @Column(length = 3) + private Long wed; + + @Column(length = 3) + private Long thu; + + @Column(length = 3) + private Long fri; + + @Column(length = 3) + private Long sat; + + @Column(length = 3) + private Long sun; + +}