mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 06:22:40 +00:00
Removed useless status in matching sql request
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AdStatus, Frequency, Role } from '@modules/ad/core/domain/ad.types';
|
||||
import { Frequency, Role } from '@modules/ad/core/domain/ad.types';
|
||||
import { Selector } from '../algorithm.abstract';
|
||||
import { Waypoint } from '../../../types/waypoint.type';
|
||||
import { Point } from '../../../types/point.type';
|
||||
@@ -133,7 +133,6 @@ export class PassengerOrientedSelector extends Selector {
|
||||
|
||||
private _createWhere = (role: Role): string =>
|
||||
[
|
||||
this._whereStatus(),
|
||||
this._whereRole(role),
|
||||
this._whereStrict(),
|
||||
this._whereDate(),
|
||||
@@ -145,8 +144,6 @@ export class PassengerOrientedSelector extends Selector {
|
||||
.filter((where: string) => where != '')
|
||||
.join(' AND ');
|
||||
|
||||
private _whereStatus = (): string => `status='${AdStatus.VALID}'`;
|
||||
|
||||
private _whereRole = (role: Role): string =>
|
||||
role == Role.PASSENGER ? 'driver=True' : 'passenger=True';
|
||||
|
||||
|
||||
@@ -53,10 +53,3 @@ export enum Role {
|
||||
DRIVER = 'DRIVER',
|
||||
PASSENGER = 'PASSENGER',
|
||||
}
|
||||
|
||||
export enum AdStatus {
|
||||
PENDING = 'PENDING',
|
||||
VALID = 'VALID',
|
||||
INVALID = 'INVALID',
|
||||
SUSPENDED = 'SUSPENDED',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user