26 lines
688 B
Java
Executable File
26 lines
688 B
Java
Executable File
package com.plannaplan.responses.models;
|
|
|
|
import com.plannaplan.entities.Assignment;
|
|
import com.plannaplan.entities.Groups;
|
|
import io.swagger.annotations.ApiModel;
|
|
|
|
@ApiModel(description = "Response shows information about group with included capacity.", value = "GroupWithCapacityResponse")
|
|
public class GroupWithCapacityResponse extends GroupDefaultResponse {
|
|
|
|
private int capacity;
|
|
|
|
public GroupWithCapacityResponse(Groups group) {
|
|
super(group);
|
|
this.capacity = group.getCapacity();
|
|
}
|
|
|
|
public GroupWithCapacityResponse(Assignment assignment) {
|
|
this(assignment.getGroup());
|
|
}
|
|
|
|
public int getCapacity() {
|
|
return capacity;
|
|
}
|
|
|
|
}
|