2021-05-20 11:04:29 +02:00
|
|
|
import { Choice, ChoiceGroup } from './choice.model';
|
2020-05-05 18:17:12 +02:00
|
|
|
import { Comment } from './comment.model';
|
2021-04-28 12:01:09 +02:00
|
|
|
import { Owner } from './owner.model';
|
2021-05-20 11:04:29 +02:00
|
|
|
import { DateChoice, TimeSlices } from './dateChoice.model';
|
2021-05-20 12:34:49 +02:00
|
|
|
import { defaultTimeOfDay } from '../../../../mocks/old-stuff/config/defaultConfigs';
|
2021-04-30 14:15:21 +02:00
|
|
|
|
2020-04-19 14:22:10 +02:00
|
|
|
export class Poll {
|
2021-04-30 16:00:22 +02:00
|
|
|
public admin_key: string;
|
2021-04-30 12:37:04 +02:00
|
|
|
public allow_comments?: boolean = true;
|
2021-04-30 23:24:48 +02:00
|
|
|
public allowComments?: boolean = true;
|
2021-11-23 10:21:02 +01:00
|
|
|
public allowed_answers = ['yes', 'maybe', 'no'];
|
|
|
|
public allowSeveralHours?: boolean;
|
|
|
|
public archiveNumberOfDays?: number;
|
|
|
|
public areResultsPublic?: boolean = true;
|
|
|
|
public choices: Choice[] = [];
|
|
|
|
public choices_grouped: ChoiceGroup[] = [];
|
|
|
|
public comments: Comment[] = [];
|
|
|
|
public creation_date?: string = new Date().toISOString();
|
|
|
|
public creatorEmail?: string;
|
|
|
|
public creatorPseudo?: string;
|
|
|
|
public dateChoices: DateChoice[] = [];
|
|
|
|
public default_expiracy_days_from_now = 60;
|
|
|
|
public description?: string;
|
|
|
|
public expiracy_date?: string;
|
2021-04-30 12:37:04 +02:00
|
|
|
public has_several_hours?: boolean = false;
|
2021-04-30 23:33:56 +02:00
|
|
|
public hasSeveralHours?: boolean = false;
|
2021-11-23 10:21:02 +01:00
|
|
|
public id = 0;
|
|
|
|
public is_archived?: boolean;
|
2021-04-30 23:43:44 +02:00
|
|
|
public isMaybeAnswerAvailable?: boolean = true;
|
2021-11-23 10:21:02 +01:00
|
|
|
public isOwnerNotifiedByEmailOnNewComment?: boolean = true;
|
|
|
|
public isOwnerNotifiedByEmailOnNewVote?: boolean = true;
|
|
|
|
public is_zero_knowledge?: boolean = false;
|
|
|
|
public kind = 'date';
|
|
|
|
public hideResults = false;
|
2021-04-30 12:37:04 +02:00
|
|
|
public max_count_of_answers?: number = 150;
|
2021-04-30 23:24:48 +02:00
|
|
|
public maxCountOfAnswers?: number = 150;
|
2021-11-23 10:21:02 +01:00
|
|
|
public max_score?: number;
|
2021-04-27 13:04:32 +02:00
|
|
|
public modification_policy = 'everybody';
|
2021-11-23 10:21:02 +01:00
|
|
|
public password?: string;
|
|
|
|
public stacks = [];
|
2021-05-20 12:34:49 +02:00
|
|
|
public timeSlices: TimeSlices[] = Object.create(defaultTimeOfDay); // ranges of time expressed as strings
|
2021-11-23 10:21:02 +01:00
|
|
|
public votes = [];
|
2021-04-26 11:27:44 +02:00
|
|
|
|
2021-04-30 22:49:55 +02:00
|
|
|
constructor(public owner: Owner = new Owner(), public title = 'mon titre', public custom_url: string = '') {}
|
2020-04-19 14:22:10 +02:00
|
|
|
}
|