-
Notifications
You must be signed in to change notification settings - Fork 307
Expand file tree
/
Copy pathSession.java
More file actions
40 lines (34 loc) · 1.07 KB
/
Session.java
File metadata and controls
40 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package nextstep.sessions.domain;
public class Session {
private Long id;
private String title;
private SessionType type;
private SessionStatus status;
private SessionPeriod period;
private Image coverImage;
private EnrollmentCapacity enrollmentCapacity;
private Long price;
public Session(Long price) {
this.price = price;
}
public Session(SessionStatus status, Long price) {
this.status = status;
this.price = price;
}
public Session(Long id, String title, SessionType type, SessionStatus status, SessionPeriod period, Image coverImage, EnrollmentCapacity enrollmentCapacity, Long price) {
this.id = id;
this.title = title;
this.type = type;
this.status = status;
this.period = period;
this.coverImage = coverImage;
this.enrollmentCapacity = enrollmentCapacity;
this.price = price;
}
public Long price() {
return this.price;
}
public boolean isRecruiting() {
return status.equals(SessionStatus.RECRUITING);
}
}