funky-framadate-front/src/app/core/models/poll.DTO.model.ts

47 lines
1.6 KiB
TypeScript
Raw Normal View History

2021-11-08 09:32:50 +01:00
import { Choice, ChoiceGroup } from './choice.model';
import { DateChoice, TimeSlices } from './dateChoice.model';
export class PollDTO {
menuVisible = true;
expiracyDateDefaultInDays;
deletionDateAfterLastModification;
pollType: string = 'date'; // classic or dates
title;
description;
myName;
myComment = '';
isAdmin; // when we create a poll; we are admin on it
myVoteStack;
myTempVoteStack;
myEmail;
myPolls; // list of retrieved polls from the backend api
allowSeveralHours;
visibility; // visible to one with the link:
voteChoices = 'yes; maybe; no'; // possible answers to a vote choice: only "yes"; "yes; maybe; no"
created_at;
expirationDate; // expiracy date
voteStackId; // id of the vote stack to update
pollId; // id of the current poll when created. data given by the backend api
pollSlug; // id of the current poll when created. data given by the backend api
currentPoll; // current poll selected with createPoll or getPoll of ConfigService
passwordAccess;
password;
customUrl; // custom slug in the url; must be unique
customUrlIsUnique; // given by the backend
urlSlugPublic;
urlPublic;
urlAdmin;
adminKey; // key to change config of the poll
owner_modifier_token; // key to change a vote stack
canModifyAnswers; // bool for the frontend selector
whoModifiesAnswers; // everybody; self; nobody (: just admin)
whoCanChangeAnswers; // everybody; self; nobody (: just admin)
dateList; // sets of days as strings; config to set identical time for days in a special days poll
timeList; // ranges of time expressed as strings
answers;
displayConfirmVoteModalAdmin;
constructor() {}
}