import {AbstractCall, BaseRequestPayload, BaseResponsePayload} from "../../../src/AbstractCall"; import {Service} from "../../../src/Service"; import {Poll} from "../ObjectInterfaces"; /** * The call to find all finished polls which the user has created. */ export class DBPastPollsCreatedCall extends AbstractCall { getRequestName(): string { return DBPastPollsCreatedCall.NAME; } getService(): Service { return Service.DATABASE; } } /** * Defines the structure of a {@DBPastPollsCreatedCall}. */ export module DBPastPollsCreatedCall { export const NAME = "DB_PAST_POLLS_CREATED_CALL"; export interface RequestModel extends BaseRequestPayload{ user_id : any } export interface ResponseModel extends BaseResponsePayload{ polls : Poll[] } }