[+] Create constructor for CourseInfoRating
This commit is contained in:
@@ -101,4 +101,14 @@ export class CourseInfoRating
|
|||||||
anonymous: boolean
|
anonymous: boolean
|
||||||
ratings: number[]
|
ratings: number[]
|
||||||
comment: string
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user