Skip to content

Commit

Permalink
add :: Week 임베드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Umjiseung committed Apr 13, 2024
1 parent b97783c commit 551fb56
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public class Goal {

private LocalDate ended_at;

@Embedded
private Week week_count;

private Long goal_count;

@ManyToOne
Expand Down
34 changes: 34 additions & 0 deletions src/main/java/com/mindway/server/v2/domain/goal/entity/Week.java
Original file line number Diff line number Diff line change
@@ -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;

}

0 comments on commit 551fb56

Please sign in to comment.