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 a motion block.
|
|
|
|
* @ignore
|
|
|
|
*/
|
2018-07-04 17:51:31 +02:00
|
|
|
export class MotionBlock extends BaseModel {
|
2018-07-12 14:11:31 +02:00
|
|
|
protected _collectionString: string;
|
2018-07-04 17:51:31 +02:00
|
|
|
id: number;
|
|
|
|
title: string;
|
2018-07-12 14:11:31 +02:00
|
|
|
agenda_item_id: number;
|
2018-07-04 17:51:31 +02:00
|
|
|
|
2018-07-12 14:11:31 +02:00
|
|
|
constructor(id?: number, title?: string, agenda_item_id?: number) {
|
|
|
|
super();
|
|
|
|
this._collectionString = 'motions/motion-block';
|
|
|
|
this.id = id;
|
2018-07-04 17:51:31 +02:00
|
|
|
this.title = title;
|
2018-07-12 14:11:31 +02:00
|
|
|
this.agenda_item_id = agenda_item_id;
|
2018-07-04 17:51:31 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 14:11:31 +02:00
|
|
|
getAgenda(): BaseModel | BaseModel[] {
|
|
|
|
return this.DS.get('agenda/item', this.agenda_item_id);
|
2018-07-04 17:51:31 +02:00
|
|
|
}
|
|
|
|
}
|