Courses Controller getCourses Mapping
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
package com.plannaplan.responses.models;
|
||||
|
||||
import com.plannaplan.entities.Course;
|
||||
|
||||
public class CoursesResponse {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
public CoursesResponse(Course course) {
|
||||
this.id = course.getId() != null ? course.getId() : null;
|
||||
this.name = course.getName() != null ? course.getName() : "";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user