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