OpenSlides/client/src/app/shared/models/users/personal-note.ts

28 lines
660 B
TypeScript
Raw Normal View History

import { BaseModel } from '../base.model';
2018-09-04 11:33:28 +02:00
import { User } from './user';
/**
* Representation of users personal note.
* @ignore
*/
export class PersonalNote extends BaseModel {
protected _collectionString: string;
2018-08-29 13:21:25 +02:00
public id: number;
public user_id: number;
public notes: Object;
2018-09-04 11:33:28 +02:00
public constructor(input: any) {
super();
this._collectionString = 'users/personal-note';
2018-09-04 11:33:28 +02:00
if (input) {
this.deserialize(input);
}
}
2018-09-04 11:33:28 +02:00
public getUser(): User {
return this.DS.get<User>('users/user', this.user_id);
}
}
2018-08-24 13:05:03 +02:00
BaseModel.registerCollectionElement('users/personal-note', PersonalNote);