|
|
@@ -76,4 +76,21 @@ public class CourseVO {
|
|
|
this.bought = bought;
|
|
|
this.manageable = manageable;
|
|
|
}
|
|
|
+
|
|
|
+ public CourseVO(@NonNull Course course, boolean bought, boolean manageable, int courselikes){
|
|
|
+ id = course.getId();
|
|
|
+ name = course.getName();
|
|
|
+ type = course.getType();
|
|
|
+ intro = course.getIntro();
|
|
|
+ picture = course.getPicture();
|
|
|
+ school = course.getSchool();
|
|
|
+ createTime = course.getCreateTime();
|
|
|
+ cost = course.getCost();
|
|
|
+ teacherId = course.getTeacherId();
|
|
|
+ teacherName = course.getTeacherName();
|
|
|
+ likes = courselikes;
|
|
|
+ liked = courselikes>0;
|
|
|
+ this.bought = bought;
|
|
|
+ this.manageable = manageable;
|
|
|
+ }
|
|
|
}
|