Skip to content

Commit a3c0efa

Browse files
committed
refactor(Reservation): [9단계] 시간 타입 String 에서 객체로 변경
1 parent 24fb51c commit a3c0efa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/roomescape/model/reservation/Reservation.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package roomescape.model.reservation;
22

3+
import roomescape.model.time.Time;
4+
35
public class Reservation {
46

57
private Long id;
68
private String name;
79
private String date;
8-
private String time;
10+
private Time time;
911

10-
public Reservation(String name, String date, String time) {
12+
public Reservation(String name, String date, Time time) {
1113
this.name = name;
1214
this.date = date;
1315
this.time = time;
@@ -29,7 +31,7 @@ public String getDate() {
2931
return date;
3032
}
3133

32-
public String getTime() {
34+
public Time getTime() {
3335
return time;
3436
}
3537
}

0 commit comments

Comments
 (0)