OpenSlides/client/src/app/shared/models/assignments/poll-option.ts

31 lines
721 B
TypeScript
Raw Normal View History

import { Deserializable } from '../deserializable.model';
/**
* Representation of a poll option
*
* part of the 'polls-options'-array in poll
* @ignore
*/
export class PollOption implements Deserializable {
2018-08-29 13:21:25 +02:00
public id: number;
public candidate_id: number;
public is_elected: boolean;
public votes: number[];
public poll_id: number;
public weight: number;
/**
* Needs to be completely optional because poll has (yet) the optional parameter 'poll-options'
2018-09-04 11:33:28 +02:00
* @param input
*/
2018-09-04 11:33:28 +02:00
public constructor(input?: any) {
if (input) {
this.deserialize(input);
}
}
2018-09-04 11:33:28 +02:00
public deserialize(input: any): void {
Object.assign(this, input);
}
}