import {AbstractCall, BaseRequestPayload, BaseResponsePayload} from "../../../src/AbstractCall"; import {Service} from "../../../src/Service"; /** * The call to create a new poll. */ export class DBCreatePollCall extends AbstractCall { getRequestName(): string { return DBCreatePollCall.NAME; } getService(): Service { return Service.DATABASE; } } /** * Defines the structure of a {@DBCreatePollCall}. */ export module DBCreatePollCall { export const NAME = "DB_CREATE_POLL_CALL"; export interface RequestModel extends BaseRequestPayload{ user_id?: any creator_name?:string title: string start_date_poll: Date end_date_poll: Date displayed_dates?: Date[] exposing: boolean location?: string timeslot_min_duration?: number hash?: string cal_timesteps: number theme?: string color_nav?: string color_content?: string color_buttons?: string logo?: string timeslots?: {start_date: Date, end_date: Date}[] } export interface ResponseModel extends BaseResponsePayload{ poll_id : any creator_id:any } }