Added enums
This commit is contained in:
@ -5,6 +5,9 @@ import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import com.plannaplan.types.GroupType;
|
||||
import com.plannaplan.types.WeekDay;
|
||||
|
||||
@Entity
|
||||
public class Groups {
|
||||
@Id
|
||||
@ -14,10 +17,28 @@ public class Groups {
|
||||
private int time;
|
||||
private String room;
|
||||
private int capacity;
|
||||
private GroupType type;
|
||||
private WeekDay day;
|
||||
|
||||
public Groups() {
|
||||
}
|
||||
|
||||
public WeekDay getDay() {
|
||||
return day;
|
||||
}
|
||||
|
||||
public void setDay(WeekDay day) {
|
||||
this.day = day;
|
||||
}
|
||||
|
||||
public GroupType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(GroupType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getCapacity() {
|
||||
return capacity;
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
package com.plannaplan.types;
|
||||
|
||||
public enum GroupType {
|
||||
LECTURE, CLASS
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.plannaplan.types;
|
||||
|
||||
public enum WeekDay {
|
||||
MONDAY(1), TUESDAY(2), WEDNESDAY(3), THURSDAY(4), FRIDAY(5), SATURDAY(6), SUNDAY(7);
|
||||
|
||||
public final int label;
|
||||
|
||||
private WeekDay(int label) {
|
||||
this.label = label;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user