Added enums

This commit is contained in:
Filip Izydorczyk
2020-07-25 09:58:40 +02:00
parent c96d6d8380
commit 8b5d73a5dd
4 changed files with 38 additions and 1 deletions

View File

@ -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;
}

View File

@ -0,0 +1,5 @@
package com.plannaplan.types;
public enum GroupType {
LECTURE, CLASS
}

View File

@ -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;
}
}