mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 08:22:41 +00:00
fixed bad ad mapping
This commit is contained in:
@@ -29,47 +29,4 @@ export class RouteEntity extends AggregateRoot<RouteProps> {
|
||||
validate(): void {
|
||||
// entity business rules validation to protect it's invariant before saving entity to a database
|
||||
}
|
||||
|
||||
// private static getPaths = (
|
||||
// roles: Role[],
|
||||
// waypoints: WaypointProps[],
|
||||
// ): Path[] => {
|
||||
// const paths: Path[] = [];
|
||||
// if (roles.includes(Role.DRIVER) && roles.includes(Role.PASSENGER)) {
|
||||
// if (waypoints.length == 2) {
|
||||
// // 2 points => same route for driver and passenger
|
||||
// paths.push(this.createGenericPath(waypoints));
|
||||
// } else {
|
||||
// paths.push(
|
||||
// this.createDriverPath(waypoints),
|
||||
// this.createPassengerPath(waypoints),
|
||||
// );
|
||||
// }
|
||||
// } else if (roles.includes(Role.DRIVER)) {
|
||||
// paths.push(this.createDriverPath(waypoints));
|
||||
// } else if (roles.includes(Role.PASSENGER)) {
|
||||
// paths.push(this.createPassengerPath(waypoints));
|
||||
// }
|
||||
// return paths;
|
||||
// };
|
||||
|
||||
// private static createGenericPath = (waypoints: WaypointProps[]): Path =>
|
||||
// this.createPath(waypoints, PathType.GENERIC);
|
||||
|
||||
// private static createDriverPath = (waypoints: WaypointProps[]): Path =>
|
||||
// this.createPath(waypoints, PathType.DRIVER);
|
||||
|
||||
// private static createPassengerPath = (waypoints: WaypointProps[]): Path =>
|
||||
// this.createPath(
|
||||
// [waypoints[0], waypoints[waypoints.length - 1]],
|
||||
// PathType.PASSENGER,
|
||||
// );
|
||||
|
||||
// private static createPath = (
|
||||
// points: WaypointProps[],
|
||||
// type: PathType,
|
||||
// ): Path => ({
|
||||
// type,
|
||||
// points,
|
||||
// });
|
||||
}
|
||||
|
||||
@@ -45,5 +45,3 @@ export type Spacetime = {
|
||||
};
|
||||
|
||||
export type Step = Point & Spacetime;
|
||||
|
||||
export type Waystep = Waypoint & Spacetime;
|
||||
|
||||
Reference in New Issue
Block a user