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

46 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 {
2021-11-23 10:21:02 +01:00
adminKey; // key to change config of the poll
allowSeveralHours;
answers;
canModifyAnswers; // bool for the frontend selector
created_at;
currentPoll; // current poll selected with createPoll or getPoll of ConfigService
custom_url; // custom slug in the url; must be unique
customUrlIsUnique; // given by the backend
dateList; // sets of days as strings; config to set identical time for days in a special days poll
2021-11-08 09:32:50 +01:00
deletionDateAfterLastModification;
description;
2021-11-23 10:21:02 +01:00
displayConfirmVoteModalAdmin;
default_expiracy_days_from_now;
expirationDate; // expiracy date
2021-11-08 09:32:50 +01:00
isAdmin; // when we create a poll; we are admin on it
2021-11-23 10:21:02 +01:00
kind: string;
myComment = '';
2021-11-08 09:32:50 +01:00
myEmail;
2021-11-23 10:21:02 +01:00
myName;
2021-11-08 09:32:50 +01:00
myPolls; // list of retrieved polls from the backend api
2021-11-23 10:21:02 +01:00
myTempVoteStack;
myVoteStack;
owner_modifier_token; // key to change a vote stack
password;
passwordAccess;
2021-11-08 09:32:50 +01:00
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
2021-11-23 10:21:02 +01:00
pollType: string = 'date'; // classic or dates
timeList; // ranges of time expressed as strings
title;
2021-11-08 09:32:50 +01:00
urlAdmin;
2021-11-23 10:21:02 +01:00
urlPublic;
urlSlugPublic;
visibility; // visible to one with the link:
voteChoices = 'yes; maybe; no'; // possible answers to a vote timeSlice: only "yes"; "yes; maybe; no"
voteStackId; // id of the vote stack to update
2021-11-08 09:32:50 +01:00
whoCanChangeAnswers; // everybody; self; nobody (: just admin)
2021-11-23 10:21:02 +01:00
whoModifiesAnswers; // everybody; self; nobody (: just admin)
2021-11-08 09:32:50 +01:00
constructor() {}
}