58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
import { CreateAdProps, Frequency } from '@modules/ad/core/domain/ad.types';
|
|
import { WaypointProps } from '@modules/ad/core/domain/value-objects/waypoint.value-object';
|
|
|
|
const originWaypointProps: WaypointProps = {
|
|
position: 0,
|
|
address: {
|
|
houseNumber: '5',
|
|
street: 'Avenue Foch',
|
|
locality: 'Nancy',
|
|
postalCode: '54000',
|
|
country: 'France',
|
|
coordinates: {
|
|
lat: 48.689445,
|
|
lon: 6.17651,
|
|
},
|
|
},
|
|
};
|
|
const destinationWaypointProps: WaypointProps = {
|
|
position: 1,
|
|
address: {
|
|
locality: 'Paris',
|
|
postalCode: '75000',
|
|
country: 'France',
|
|
coordinates: {
|
|
lat: 48.8566,
|
|
lon: 2.3522,
|
|
},
|
|
},
|
|
};
|
|
const baseCreateAdProps = {
|
|
userId: 'e8fe64b1-4c33-49e1-9f69-4db48b21df36',
|
|
seatsProposed: 3,
|
|
seatsRequested: 1,
|
|
strict: false,
|
|
waypoints: [originWaypointProps, destinationWaypointProps],
|
|
};
|
|
const punctualCreateAdProps = {
|
|
fromDate: '2023-06-22',
|
|
toDate: '2023-06-22',
|
|
schedule: [
|
|
{
|
|
day: 4,
|
|
time: '08:30',
|
|
margin: 900,
|
|
},
|
|
],
|
|
frequency: Frequency.PUNCTUAL,
|
|
};
|
|
|
|
export function punctualPassengerCreateAdProps(): CreateAdProps {
|
|
return {
|
|
...baseCreateAdProps,
|
|
...punctualCreateAdProps,
|
|
driver: false,
|
|
passenger: true,
|
|
};
|
|
}
|