@tmlmobilidade/interfaces 20250915.1116.6 → 20250915.1142.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,9 @@ declare class RideJustificationClass extends MongoCollectionClass<RideJustificat
|
|
|
8
8
|
protected updateSchema: z.ZodSchema;
|
|
9
9
|
private constructor();
|
|
10
10
|
static getInstance(): Promise<RideJustificationClass>;
|
|
11
|
+
createByTripId(trip_id: string, data: CreateRideJustificationDto): Promise<RideJustification>;
|
|
12
|
+
findByTripId(trip_id: string): Promise<null | RideJustification>;
|
|
13
|
+
updateByTripId(trip_id: string, data: UpdateRideJustificationDto): Promise<RideJustification>;
|
|
11
14
|
protected getCollectionIndexes(): IndexDescription[];
|
|
12
15
|
protected getCollectionName(): string;
|
|
13
16
|
protected getEnvName(): string;
|
|
@@ -18,6 +18,15 @@ class RideJustificationClass extends MongoCollectionClass {
|
|
|
18
18
|
}
|
|
19
19
|
return RideJustificationClass._instance;
|
|
20
20
|
}
|
|
21
|
+
async createByTripId(trip_id, data) {
|
|
22
|
+
return super.insertOne({ ...data, trip_id });
|
|
23
|
+
}
|
|
24
|
+
async findByTripId(trip_id) {
|
|
25
|
+
return super.findOne({ trip_id });
|
|
26
|
+
}
|
|
27
|
+
async updateByTripId(trip_id, data) {
|
|
28
|
+
return super.updateOne({ trip_id }, data);
|
|
29
|
+
}
|
|
21
30
|
getCollectionIndexes() {
|
|
22
31
|
return [
|
|
23
32
|
{ background: true, key: { trip_id: 1 } },
|
package/package.json
CHANGED