models/communities/PollContent.js

import PollOptionContent from './PollOptionContent.js';

export default class PollContent {
    /**
     * Creates a PollContent
     *
     * @constructor PollContent
     * @param {Object} params - Poll content parameters.
     * @param {boolean} [params.allowMultipleVotes=false] - True if multiple votes is allowed
     * @param {number} [params.endDate] - Date when the poll ends.
     * @param {PollOptionContent[]} [params.options=[]] - Poll options.
     */
    constructor(params) {
      this.allowMultipleVotes = params.allowMultipleVotes || false;
      this.endDate = params.endDate || null;
      this.options = params.options || [];
    }
}