2018-07-23 16:42:17 +02:00
|
|
|
import { BaseModel } from '../base.model';
|
2018-07-04 17:51:31 +02:00
|
|
|
|
2018-07-12 14:11:31 +02:00
|
|
|
/**
|
|
|
|
* Representation of users personal note.
|
|
|
|
* @ignore
|
|
|
|
*/
|
2018-07-04 17:51:31 +02:00
|
|
|
export class PersonalNote extends BaseModel {
|
2018-07-12 14:11:31 +02:00
|
|
|
protected _collectionString: string;
|
2018-07-04 17:51:31 +02:00
|
|
|
id: number;
|
|
|
|
user_id: number;
|
2018-07-12 14:11:31 +02:00
|
|
|
notes: Object;
|
2018-07-04 17:51:31 +02:00
|
|
|
|
2018-07-12 14:11:31 +02:00
|
|
|
constructor(id?: number, user_id?: number, notes?: Object) {
|
|
|
|
super();
|
|
|
|
this._collectionString = 'users/personal-note';
|
|
|
|
this.id = id;
|
2018-07-04 17:51:31 +02:00
|
|
|
this.user_id = user_id;
|
2018-07-12 14:11:31 +02:00
|
|
|
this.notes = notes;
|
2018-07-04 17:51:31 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 14:11:31 +02:00
|
|
|
getUser(): BaseModel | BaseModel[] {
|
|
|
|
return this.DS.get('users/user', this.user_id);
|
2018-07-04 17:51:31 +02:00
|
|
|
}
|
|
|
|
}
|