Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2020-11-08 16:55:56 +01:00
parent 8ba148617a
commit a30c3af09c
10 changed files with 41 additions and 2 deletions

View File

@ -4,8 +4,15 @@ import java.sql.Timestamp;
import com.plannaplan.entities.Commision;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(description = "Response shows information about commision", value = "CommisionResponse")
public class CommisionResponse {
@ApiModelProperty(value = "ID created by database")
private Long id;
@ApiModelProperty(value = "Timestamp where the user commit the commision")
private Timestamp commisionDate;
public CommisionResponse(Commision commision) {

View File

@ -4,13 +4,28 @@ import com.plannaplan.entities.Assignment;
import com.plannaplan.entities.Groups;
import com.plannaplan.types.GroupType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(description = "Response shows information about given group", value = "DefaultGroupResponse")
public class DefaultGroupResponse {
@ApiModelProperty(value = "ID created by database.")
private Long id;
@ApiModelProperty(value = "Value shows what day when the course is. Example 0 is Monday.")
private int day;
@ApiModelProperty(value = "Value shows time when the course takes.")
private String time;
@ApiModelProperty(value = "Value shows degree, name and surname.")
private String lecturer;
@ApiModelProperty(value = "Value shows room where the class takes.")
private String room;
@ApiModelProperty(value = "Value shows kind of group. The types are LECTURE or CLASS.")
private GroupType type;
public DefaultGroupResponse(Groups group) {

View File

@ -3,6 +3,9 @@ package com.plannaplan.responses.models;
import java.util.ArrayList;
import java.util.List;
import io.swagger.annotations.ApiModel;
@ApiModel(description = "Response shows information about groups to given course.", value = "DefaultGroupResponse")
public class GetCourseGroupsResponse <T> {
private List<T> lectures = new ArrayList<>();

View File

@ -3,6 +3,9 @@ package com.plannaplan.responses.models;
import com.plannaplan.entities.Course;
import com.plannaplan.responses.models.abstracts.CoursesResponse;
import io.swagger.annotations.ApiModel;
@ApiModel(description = "Response shows information about course.", value = "DefaultGroupResponse")
public class GetCoursesResponse extends CoursesResponse {
public GetCoursesResponse(Course course) {

View File

@ -7,6 +7,9 @@ import com.plannaplan.entities.Course;
import com.plannaplan.responses.models.abstracts.CoursesResponse;
import com.plannaplan.types.GroupType;
import io.swagger.annotations.ApiModel;
@ApiModel(description = "Response shows information about groups to given course.", value = "GetCoursesWithGroupsResponse")
public class GetCoursesWithGroupsResponse extends CoursesResponse {
private List<DefaultGroupResponse> lectures = new ArrayList<>();

View File

@ -4,6 +4,9 @@ import com.plannaplan.entities.Course;
import com.plannaplan.entities.Groups;
import com.plannaplan.types.GroupType;
import io.swagger.annotations.ApiModel;
@ApiModel(description = "Response shows information about given assigment to course.", value = "GetCurrentAssignmentsResponse")
public class GetCurrentAssignmentsResponse {
private Long id;
private String name;

View File

@ -2,6 +2,9 @@ package com.plannaplan.responses.models;
import com.plannaplan.entities.User;
import io.swagger.annotations.ApiModel;
@ApiModel(description = "Response shows information about user.", value = "SearchForStudentsResponse")
public class SearchForStudentsResponse {
private Long id;

View File

@ -2,7 +2,9 @@ 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 = "WithCapacityGroupResponse")
public class WithCapacityGroupResponse extends DefaultGroupResponse {
private int capacity;