Added Assignment Response Model
This commit is contained in:
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@CrossOrigin
|
||||
public class TokenController {
|
||||
|
||||
public static String SERVICE_URL = "http://localhost:3000";
|
||||
private final static String SERVICE_URL = "http://localhost:3000";
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.plannaplan.responses.models;
|
||||
|
||||
import com.plannaplan.entities.Groups;
|
||||
import com.plannaplan.types.GroupType;
|
||||
|
||||
public class AssignmentResponse {
|
||||
|
||||
private Long id;
|
||||
private int day;
|
||||
private String time;
|
||||
private String lecturer;
|
||||
private String room;
|
||||
private int capacity;
|
||||
private GroupType type;
|
||||
|
||||
public AssignmentResponse(Groups group) {
|
||||
this.id = group.getId();
|
||||
this.day = group.getDay().label;
|
||||
this.time = group.getTimeString();
|
||||
this.lecturer = group.getLecturer().toString();
|
||||
this.room = group.getRoom();
|
||||
this.capacity = group.getCapacity();
|
||||
this.type = group.getType();
|
||||
}
|
||||
|
||||
public GroupType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public int getCapacity() {
|
||||
return capacity;
|
||||
}
|
||||
|
||||
public String getRoom() {
|
||||
return room;
|
||||
}
|
||||
|
||||
public String getLecturer() {
|
||||
return lecturer;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public int getDay() {
|
||||
return day;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user