import { Attr } from 'ts-framework' import { RiderTrip } from './rider-trip-domain' import { TripAssistanceDTO, TripAssistanceResponseDTO } from './trip-assistance' import { CreateTripLocationDTO, TripLocationResponseDTO } from './trip-location' import { CreateTripRiderDTO, TripRiderResponseDTO } from './trip-rider' export class CreateRiderTripRequestDTO { @Attr({ type: TripAssistanceDTO, optional: true }) assistance?: TripAssistanceDTO[] @Attr({ type: CreateTripLocationDTO }) dropoffLocation: CreateTripLocationDTO @Attr({ type: CreateTripLocationDTO }) pickupLocation: CreateTripLocationDTO @Attr({ type: CreateTripRiderDTO }) rider: CreateTripRiderDTO @Attr({ type: Number, optional: true }) riderCost?: number @Attr({ type: String, optional: true }) notes?: string } class RiderTripTripRelation { @Attr({ type: String }) id: string } export class CreateRiderTripDTO { @Attr({ type: TripAssistanceDTO, optional: true }) assistance?: TripAssistanceDTO[] @Attr({ type: CreateTripLocationDTO }) dropoffLocation: CreateTripLocationDTO @Attr({ type: CreateTripLocationDTO }) pickupLocation: CreateTripLocationDTO @Attr({ type: CreateTripRiderDTO }) rider: CreateTripRiderDTO @Attr({ type: Number, optional: true }) riderCost?: number @Attr({ type: RiderTripTripRelation }) trip: RiderTripTripRelation @Attr({ type: String, optional: true }) notes?: string } export class RiderTripDTO { @Attr({ type: TripAssistanceDTO, optional: true }) assistance?: TripAssistanceDTO[] @Attr({ type: CreateTripRiderDTO }) rider: CreateTripRiderDTO @Attr({ type: Number, optional: true }) riderCost: number } export class RiderTripDomain { @Attr({ type: String }) id: string @Attr({ type: TripAssistanceResponseDTO }) assistance: TripAssistanceResponseDTO[] @Attr({ type: TripLocationResponseDTO }) dropoffLocation: TripLocationResponseDTO @Attr({ type: TripLocationResponseDTO }) pickupLocation: TripLocationResponseDTO @Attr({ type: TripRiderResponseDTO }) rider: TripRiderResponseDTO @Attr({ type: Number }) riderCost: number @Attr({ type: RiderTrip }) trip: RiderTrip }