[+] Create constructor for CourseInfoRating

This commit is contained in:
Hykilpikonna
2020-04-27 02:19:20 -04:00
parent 6309a77b63
commit 9adc78f287
+10
View File
@@ -101,4 +101,14 @@ export class CourseInfoRating
anonymous: boolean
ratings: number[]
comment: string
constructor(json: any)
{
this.id_ci = json.id_ci;
this.id_user = json.id_user;
this.userFullName = json.userFullName;
this.anonymous = this.id_user == -1;
this.ratings = json.ratings;
this.comment = json.comment;
}
}