import { Attr } from 'ts-framework' import * as constants from '../constants' import { PaginationRequestDTO } from './pagination' export class GetMembershipRequestsListDTO implements PaginationRequestDTO { @Attr({ type: String }) organizationId: string @Attr({ type: Number, optional: true }) page?: number; @Attr({ type: Number, optional: true }) recordsPerPage?: number; } export class AcceptServiceMembershipDTO { @Attr({ type: String }) id: string @Attr({ type: Date }) beginsAt: Date @Attr({ type: String }) recurringType: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipStatuses } }) status: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipTypes } }) type: string @Attr({ type: Date, optional: true }) expiresAt?: Date @Attr({ type: Number, optional: true }) ridesNum?: number } export class ChangeStatusServiceMembershipDTO { @Attr({ type: String }) id: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipStatuses } }) status: string } export class CreateServiceMembershipDTO { @Attr({ type: String, optional: true }) externalRiderId?: string @Attr({ type: Date, optional: true }) beginsAt?: Date @Attr({ type: Date, optional: true }) expiresAt?: Date @Attr({ type: String, optional: true }) recurringType?: string @Attr({ type: Date, optional: true }) requestedAt?: Date @Attr({ type: Number, optional: true }) ridesNum?: number @Attr({ type: String, optional: true }) ridesRangeType?: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipStatuses }, optional: true }) status?: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipTypes }, optional: true }) type?: string } export class CreateNewServiceMembershipDTO { @Attr({ type: String }) riderId: string @Attr({ type: String }) serviceId: string @Attr({ type: CreateServiceMembershipDTO }) membership: CreateServiceMembershipDTO } export class RequestServiceMembershipDTO { @Attr({ type: String }) serviceId: string @Attr({ type: String }) riderId: string } export class ServiceMembershipDTO { @Attr({ type: String, optional: true }) id?: string @Attr({ type: String, optional: true }) externalRiderId?: string @Attr({ type: String }) serviceId: string @Attr({ type: Date, optional: true }) beginsAt?: Date @Attr({ type: Date, optional: true }) expiresAt?: Date @Attr({ type: String, optional: true }) recurringType?: string @Attr({ type: Date, optional: true }) requestedAt?: Date @Attr({ type: Number, optional: true }) ridesNum?: number @Attr({ type: String, optional: true }) ridesRangeType?: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipStatuses }, optional: true }) status?: string } export class ServiceMembershipByOrgsDTO { organizationIds: string[] } export class UpdateServiceMembershipDTO { @Attr({ type: String }) id: string @Attr({ type: String, optional: true }) externalRiderId?: string @Attr({ type: Date, optional: true }) beginsAt?: Date @Attr({ type: Date, optional: true }) expiresAt?: Date @Attr({ type: String, optional: true }) recurringType?: string @Attr({ type: Date, optional: true }) requestedAt?: Date @Attr({ type: Number, optional: true }) ridesNum?: number @Attr({ type: String, optional: true }) ridesRangeType?: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipStatuses }, optional: true }) status?: string @Attr({ type: String, resolver: { type: 'enum', params: constants.MembershipTypes }, optional: true }) type?: string }