Skip to content

Commit

Permalink
[#5] 습관 알림 시간 String 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Oct 18, 2021
1 parent 5ab4b8e commit 40ebbf2
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.teamnexters.lazy.common.domain.habit;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.teamnexters.lazy.common.domain.BaseTimeEntity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalTime;

@Getter
@Table(name = "habit")
Expand All @@ -18,6 +16,7 @@ public class Habit extends BaseTimeEntity {
@Column(name = "habit_idx")
private Long habitIdx;

@Setter
@Column(name = "mem_idx")
private Long memIdx;

Expand All @@ -39,13 +38,12 @@ public class Habit extends BaseTimeEntity {
@Column(name = "habit_notice_state")
private Boolean habitNoticeState;

@JsonFormat(pattern = "HH:mm")
@Column(name = "habit_notice_time")
private LocalTime habitNoticeTime;
private String habitNoticeTime;

@Builder
public Habit(Long memIdx, String habitName, String habitDetail, Integer habitCategory,
String habitFrequency, Integer habitDelayDay, Boolean habitNoticeState, LocalTime habitNoticeTime) {
String habitFrequency, Integer habitDelayDay, Boolean habitNoticeState, String habitNoticeTime) {
this.memIdx = memIdx;
this.habitName = habitName;
this.habitDetail = habitDetail;
Expand All @@ -57,7 +55,7 @@ public Habit(Long memIdx, String habitName, String habitDetail, Integer habitCat
}

public Habit update(String habitName, String habitDetail, Integer habitCategory,
Boolean habitNoticeState, LocalTime habitNoticeTime) {
Boolean habitNoticeState, String habitNoticeTime) {
this.habitName = habitName;
this.habitDetail = habitDetail;
this.habitCategory = habitCategory;
Expand Down

0 comments on commit 40ebbf2

Please sign in to comment.