OpenSlides/client/src/app/shared/models/motions/motion-block.ts

27 lines
689 B
TypeScript
Raw Normal View History

import { BaseModel } from '../base.model';
/**
* Representation of a motion block.
* @ignore
*/
export class MotionBlock extends BaseModel {
protected _collectionString: string;
id: number;
title: string;
agenda_item_id: number;
constructor(id?: number, title?: string, agenda_item_id?: number) {
super();
this._collectionString = 'motions/motion-block';
this.id = id;
this.title = title;
this.agenda_item_id = agenda_item_id;
}
getAgenda(): BaseModel | BaseModel[] {
return this.DS.get('agenda/item', this.agenda_item_id);
}
}
2018-08-24 13:05:03 +02:00
BaseModel.registerCollectionElement('motions/motion-block', MotionBlock);