uaxi-shared-entities 1.0.7 → 1.0.9
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.
- package/dist/entities/coupon.entity.d.ts +4 -4
- package/dist/entities/coupon.entity.js +3 -3
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +1 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/trip-beneficiary.entity.d.ts +20 -0
- package/dist/entities/trip-beneficiary.entity.d.ts.map +1 -0
- package/dist/entities/trip-beneficiary.entity.js +53 -0
- package/dist/entities/trip-beneficiary.entity.js.map +1 -0
- package/dist/entities/trip-route-change.entity.d.ts +3 -3
- package/dist/entities/trip-route-change.entity.js +7 -7
- package/dist/entities/trips.entity.d.ts +23 -12
- package/dist/entities/trips.entity.d.ts.map +1 -1
- package/dist/entities/trips.entity.js +43 -16
- package/dist/entities/trips.entity.js.map +1 -1
- package/dist/entities/user.entity.d.ts +10 -0
- package/dist/entities/user.entity.d.ts.map +1 -1
- package/dist/entities/user.entity.js.map +1 -1
- package/package.json +1 -1
- package/src/entities/coupon.entity.ts +7 -7
- package/src/entities/index.ts +1 -0
- package/src/entities/trip-beneficiary.entity.ts +61 -0
- package/src/entities/trip-route-change.entity.ts +24 -24
- package/src/entities/trips.entity.ts +65 -29
- package/src/entities/user.entity.ts +10 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Model } from
|
|
2
|
-
import { CouponUsage } from
|
|
3
|
-
import { CouponUserMapping } from
|
|
4
|
-
import { CouponApplicability, CouponStatus, CouponType } from
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { CouponUsage } from "./coupon_usages.entity";
|
|
3
|
+
import { CouponUserMapping } from "./coupon_user_mappings.entity";
|
|
4
|
+
import { CouponApplicability, CouponStatus, CouponType } from "../enums";
|
|
5
5
|
export interface CouponAttributes {
|
|
6
6
|
id: string;
|
|
7
7
|
code: string;
|
|
@@ -191,16 +191,16 @@ __decorate([
|
|
|
191
191
|
__metadata("design:type", Object)
|
|
192
192
|
], Coupon.prototype, "metadata", void 0);
|
|
193
193
|
__decorate([
|
|
194
|
-
(0, sequelize_typescript_1.HasMany)(() => coupon_usages_entity_1.CouponUsage,
|
|
194
|
+
(0, sequelize_typescript_1.HasMany)(() => coupon_usages_entity_1.CouponUsage, "couponId"),
|
|
195
195
|
__metadata("design:type", Array)
|
|
196
196
|
], Coupon.prototype, "usages", void 0);
|
|
197
197
|
__decorate([
|
|
198
|
-
(0, sequelize_typescript_1.HasMany)(() => coupon_user_mappings_entity_1.CouponUserMapping,
|
|
198
|
+
(0, sequelize_typescript_1.HasMany)(() => coupon_user_mappings_entity_1.CouponUserMapping, "couponId"),
|
|
199
199
|
__metadata("design:type", Array)
|
|
200
200
|
], Coupon.prototype, "userMappings", void 0);
|
|
201
201
|
exports.Coupon = Coupon = __decorate([
|
|
202
202
|
(0, sequelize_typescript_1.Table)({
|
|
203
|
-
tableName:
|
|
203
|
+
tableName: "coupons",
|
|
204
204
|
timestamps: true,
|
|
205
205
|
})
|
|
206
206
|
], Coupon);
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from "./coupon_user_mappings.entity";
|
|
|
24
24
|
export * from "./promotion_camping";
|
|
25
25
|
export * from "./trip-route-change.entity";
|
|
26
26
|
export * from "./trip-stop.entity";
|
|
27
|
+
export * from "./trip-beneficiary.entity";
|
|
27
28
|
export * from "./userCard.entity";
|
|
28
29
|
export * from "./supportticket-history.entity";
|
|
29
30
|
export * from "./supportticket-comment.entity";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;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,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,cAAc,CAAC"}
|
package/dist/entities/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __exportStar(require("./coupon_user_mappings.entity"), exports);
|
|
|
40
40
|
__exportStar(require("./promotion_camping"), exports);
|
|
41
41
|
__exportStar(require("./trip-route-change.entity"), exports);
|
|
42
42
|
__exportStar(require("./trip-stop.entity"), exports);
|
|
43
|
+
__exportStar(require("./trip-beneficiary.entity"), exports);
|
|
43
44
|
__exportStar(require("./userCard.entity"), exports);
|
|
44
45
|
__exportStar(require("./supportticket-history.entity"), exports);
|
|
45
46
|
__exportStar(require("./supportticket-comment.entity"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,mDAAiC;AACjC,mDAAiC;AACjC,iDAA+B;AAC/B,yDAAuC;AACvC,kDAAgC;AAChC,6DAA2C;AAC3C,kDAAgC;AAChC,qDAAmC;AACnC,yDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,iDAA+B;AAC/B,mDAAiC;AACjC,oDAAkC;AAClC,wDAAsC;AACtC,2DAAyC;AACzC,kDAAgC;AAChC,yDAAuC;AACvC,gEAA8C;AAC9C,sDAAoC;AACpC,6DAA2C;AAC3C,qDAAmC;AACnC,oDAAkC;AAClC,iEAA+C;AAC/C,iEAA+C;AAC/C,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,mDAAiC;AACjC,mDAAiC;AACjC,iDAA+B;AAC/B,yDAAuC;AACvC,kDAAgC;AAChC,6DAA2C;AAC3C,kDAAgC;AAChC,qDAAmC;AACnC,yDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,yDAAuC;AACvC,wDAAsC;AACtC,iDAA+B;AAC/B,mDAAiC;AACjC,oDAAkC;AAClC,wDAAsC;AACtC,2DAAyC;AACzC,kDAAgC;AAChC,yDAAuC;AACvC,gEAA8C;AAC9C,sDAAoC;AACpC,6DAA2C;AAC3C,qDAAmC;AACnC,4DAA0C;AAC1C,oDAAkC;AAClC,iEAA+C;AAC/C,iEAA+C;AAC/C,+CAA6B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { Trip } from "./trips.entity";
|
|
3
|
+
export interface TripBeneficiaryAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
phone: string;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
updatedAt: Date;
|
|
9
|
+
}
|
|
10
|
+
export interface CreateTripBeneficiaryData {
|
|
11
|
+
name: string;
|
|
12
|
+
phone: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class TripBeneficiary extends Model<TripBeneficiaryAttributes, CreateTripBeneficiaryData> {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
trips: Trip[];
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=trip-beneficiary.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trip-beneficiary.entity.d.ts","sourceRoot":"","sources":["../../src/entities/trip-beneficiary.entity.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGtC,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAGD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAIa,eAAgB,SAAQ,KAAK,CACxC,yBAAyB,EACzB,yBAAyB,CAC1B;IAMS,EAAE,EAAE,MAAM,CAAC;IAMnB,IAAI,EAAE,MAAM,CAAC;IAMb,KAAK,EAAE,MAAM,CAAC;IAId,KAAK,EAAE,IAAI,EAAE,CAAC;CACf"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// =============================================
|
|
3
|
+
// TRIP BENEFICIARY MODEL
|
|
4
|
+
// =============================================
|
|
5
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
6
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TripBeneficiary = void 0;
|
|
16
|
+
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
17
|
+
const trips_entity_1 = require("./trips.entity");
|
|
18
|
+
let TripBeneficiary = class TripBeneficiary extends sequelize_typescript_1.Model {
|
|
19
|
+
};
|
|
20
|
+
exports.TripBeneficiary = TripBeneficiary;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, sequelize_typescript_1.Column)({
|
|
23
|
+
type: sequelize_typescript_1.DataType.UUID,
|
|
24
|
+
defaultValue: sequelize_typescript_1.DataType.UUIDV4,
|
|
25
|
+
primaryKey: true,
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], TripBeneficiary.prototype, "id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, sequelize_typescript_1.Column)({
|
|
31
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
32
|
+
allowNull: false,
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], TripBeneficiary.prototype, "name", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, sequelize_typescript_1.Column)({
|
|
38
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], TripBeneficiary.prototype, "phone", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, sequelize_typescript_1.HasMany)(() => trips_entity_1.Trip, "requestedFor"),
|
|
45
|
+
__metadata("design:type", Array)
|
|
46
|
+
], TripBeneficiary.prototype, "trips", void 0);
|
|
47
|
+
exports.TripBeneficiary = TripBeneficiary = __decorate([
|
|
48
|
+
(0, sequelize_typescript_1.Table)({
|
|
49
|
+
tableName: "trip_beneficiaries",
|
|
50
|
+
timestamps: true,
|
|
51
|
+
})
|
|
52
|
+
], TripBeneficiary);
|
|
53
|
+
//# sourceMappingURL=trip-beneficiary.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trip-beneficiary.entity.js","sourceRoot":"","sources":["../../src/entities/trip-beneficiary.entity.ts"],"names":[],"mappings":";AAAA,gDAAgD;AAChD,yBAAyB;AACzB,gDAAgD;;;;;;;;;;;;AAEhD,+DAQ8B;AAC9B,iDAAsC;AAqB/B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,4BAGpC;CAuBA,CAAA;AA1BY,0CAAe;AASlB;IALP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,YAAY,EAAE,+BAAQ,CAAC,MAAM;QAC7B,UAAU,EAAE,IAAI;KACjB,CAAC;;2CACiB;AAMnB;IAJC,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,SAAS,EAAE,KAAK;KACjB,CAAC;;6CACW;AAMb;IAJC,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,SAAS,EAAE,KAAK;KACjB,CAAC;;8CACY;AAId;IADC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,mBAAI,EAAE,cAAc,CAAC;;8CACtB;0BAzBH,eAAe;IAJ3B,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,IAAI;KACjB,CAAC;GACW,eAAe,CA0B3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Model } from
|
|
2
|
-
import { Trip } from
|
|
3
|
-
import { User } from
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { Trip } from "./trips.entity";
|
|
3
|
+
import { User } from "./user.entity";
|
|
4
4
|
export declare enum RouteChangeType {
|
|
5
5
|
ADD_STOP = "add_stop",
|
|
6
6
|
REMOVE_STOP = "remove_stop",
|
|
@@ -202,25 +202,25 @@ __decorate([
|
|
|
202
202
|
__metadata("design:type", trips_entity_1.Trip)
|
|
203
203
|
], TripRouteChange.prototype, "trip", void 0);
|
|
204
204
|
__decorate([
|
|
205
|
-
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User,
|
|
205
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User, "requestedBy"),
|
|
206
206
|
__metadata("design:type", user_entity_1.User)
|
|
207
207
|
], TripRouteChange.prototype, "requester", void 0);
|
|
208
208
|
__decorate([
|
|
209
|
-
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User,
|
|
209
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User, "approvedBy"),
|
|
210
210
|
__metadata("design:type", user_entity_1.User)
|
|
211
211
|
], TripRouteChange.prototype, "approver", void 0);
|
|
212
212
|
exports.TripRouteChange = TripRouteChange = __decorate([
|
|
213
213
|
(0, sequelize_typescript_1.Table)({
|
|
214
|
-
tableName:
|
|
214
|
+
tableName: "trip_route_changes",
|
|
215
215
|
timestamps: true,
|
|
216
216
|
indexes: [
|
|
217
217
|
{
|
|
218
|
-
name:
|
|
219
|
-
fields: [
|
|
218
|
+
name: "trip_route_changes_trip_created_idx",
|
|
219
|
+
fields: ["tripId", "createdAt"],
|
|
220
220
|
},
|
|
221
221
|
{
|
|
222
|
-
name:
|
|
223
|
-
fields: [
|
|
222
|
+
name: "trip_route_changes_status_idx",
|
|
223
|
+
fields: ["status"],
|
|
224
224
|
},
|
|
225
225
|
],
|
|
226
226
|
})
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { Model } from
|
|
2
|
-
import { User } from
|
|
3
|
-
import { Vehicle } from
|
|
4
|
-
import { TripLocation } from
|
|
5
|
-
import { Rating } from
|
|
6
|
-
import { Payment } from
|
|
7
|
-
import { WalletTransaction } from
|
|
8
|
-
import { UserAddress } from
|
|
9
|
-
import { Coupon } from
|
|
10
|
-
import { TripStatus } from
|
|
11
|
-
import { TripStop } from
|
|
12
|
-
import { TripRouteChange } from
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { User } from "./user.entity";
|
|
3
|
+
import { Vehicle } from "./vehicle.entity";
|
|
4
|
+
import { TripLocation } from "./triplocation.entity";
|
|
5
|
+
import { Rating } from "./raitings.entity";
|
|
6
|
+
import { Payment } from "./payments.entity";
|
|
7
|
+
import { WalletTransaction } from "./walletTransaction.entity";
|
|
8
|
+
import { UserAddress } from "./address.entity";
|
|
9
|
+
import { Coupon } from "./coupon.entity";
|
|
10
|
+
import { TripStatus } from "../enums";
|
|
11
|
+
import { TripStop } from "./trip-stop.entity";
|
|
12
|
+
import { TripRouteChange } from "./trip-route-change.entity";
|
|
13
|
+
import { TripBeneficiary } from "./trip-beneficiary.entity";
|
|
13
14
|
export interface TripAttributes {
|
|
14
15
|
id: string;
|
|
15
16
|
passengerId: string;
|
|
@@ -45,6 +46,9 @@ export interface TripAttributes {
|
|
|
45
46
|
appliedCouponId: string;
|
|
46
47
|
discountAmount: number;
|
|
47
48
|
originalFare: number;
|
|
49
|
+
requestedFor: string;
|
|
50
|
+
beneficiaryName: string;
|
|
51
|
+
beneficiaryPhone: string;
|
|
48
52
|
createdAt: Date;
|
|
49
53
|
updatedAt: Date;
|
|
50
54
|
}
|
|
@@ -62,6 +66,9 @@ export interface CreateTripData {
|
|
|
62
66
|
destinationAddressId?: string;
|
|
63
67
|
appliedCouponId?: string;
|
|
64
68
|
notes?: string;
|
|
69
|
+
requestedFor?: string;
|
|
70
|
+
beneficiaryName?: string;
|
|
71
|
+
beneficiaryPhone?: string;
|
|
65
72
|
}
|
|
66
73
|
export declare class Trip extends Model<TripAttributes, CreateTripData> {
|
|
67
74
|
id: string;
|
|
@@ -93,6 +100,9 @@ export declare class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
93
100
|
cancelledAt: Date;
|
|
94
101
|
cancellationReason: string;
|
|
95
102
|
notes: string;
|
|
103
|
+
requestedFor: string;
|
|
104
|
+
beneficiaryName: string;
|
|
105
|
+
beneficiaryPhone: string;
|
|
96
106
|
passenger: User;
|
|
97
107
|
driver: User;
|
|
98
108
|
vehicle: Vehicle;
|
|
@@ -110,5 +120,6 @@ export declare class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
110
120
|
discountAmount: number;
|
|
111
121
|
originalFare: number;
|
|
112
122
|
appliedCoupon: Coupon;
|
|
123
|
+
beneficiary: TripBeneficiary;
|
|
113
124
|
}
|
|
114
125
|
//# sourceMappingURL=trips.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trips.entity.d.ts","sourceRoot":"","sources":["../../src/entities/trips.entity.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"trips.entity.d.ts","sourceRoot":"","sources":["../../src/entities/trips.entity.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAA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eAAe,EAAE,CAAC;IAOhC,eAAe,EAAE,MAAM,CAAC;IAOxB,oBAAoB,EAAE,MAAM,CAAC;IAI7B,kBAAkB,EAAE,WAAW,CAAC;IAGhC,uBAAuB,EAAE,WAAW,CAAC;IAOrC,eAAe,EAAE,MAAM,CAAC;IAMxB,cAAc,EAAE,MAAM,CAAC;IAMvB,YAAY,EAAE,MAAM,CAAC;IAIrB,aAAa,EAAE,MAAM,CAAC;IAItB,WAAW,EAAE,eAAe,CAAC;CAC9B"}
|
|
@@ -25,6 +25,7 @@ const coupon_entity_1 = require("./coupon.entity");
|
|
|
25
25
|
const enums_1 = require("../enums");
|
|
26
26
|
const trip_stop_entity_1 = require("./trip-stop.entity");
|
|
27
27
|
const trip_route_change_entity_1 = require("./trip-route-change.entity");
|
|
28
|
+
const trip_beneficiary_entity_1 = require("./trip-beneficiary.entity");
|
|
28
29
|
let Trip = class Trip extends sequelize_typescript_1.Model {
|
|
29
30
|
};
|
|
30
31
|
exports.Trip = Trip;
|
|
@@ -40,7 +41,7 @@ __decorate([
|
|
|
40
41
|
(0, sequelize_typescript_1.ForeignKey)(() => user_entity_1.User),
|
|
41
42
|
(0, sequelize_typescript_1.Column)({
|
|
42
43
|
type: sequelize_typescript_1.DataType.UUID,
|
|
43
|
-
allowNull: false,
|
|
44
|
+
allowNull: false, // Quien solicita el viaje (requerido)
|
|
44
45
|
}),
|
|
45
46
|
__metadata("design:type", String)
|
|
46
47
|
], Trip.prototype, "passengerId", void 0);
|
|
@@ -76,7 +77,7 @@ __decorate([
|
|
|
76
77
|
], Trip.prototype, "pickupAddress", void 0);
|
|
77
78
|
__decorate([
|
|
78
79
|
(0, sequelize_typescript_1.Column)({
|
|
79
|
-
type: sequelize_typescript_1.DataType.GEOMETRY(
|
|
80
|
+
type: sequelize_typescript_1.DataType.GEOMETRY("POINT", 4326),
|
|
80
81
|
allowNull: false,
|
|
81
82
|
}),
|
|
82
83
|
__metadata("design:type", Object)
|
|
@@ -104,7 +105,7 @@ __decorate([
|
|
|
104
105
|
], Trip.prototype, "destinationAddress", void 0);
|
|
105
106
|
__decorate([
|
|
106
107
|
(0, sequelize_typescript_1.Column)({
|
|
107
|
-
type: sequelize_typescript_1.DataType.GEOMETRY(
|
|
108
|
+
type: sequelize_typescript_1.DataType.GEOMETRY("POINT", 4326),
|
|
108
109
|
allowNull: false,
|
|
109
110
|
}),
|
|
110
111
|
__metadata("design:type", Object)
|
|
@@ -125,7 +126,7 @@ __decorate([
|
|
|
125
126
|
], Trip.prototype, "destinationLongitude", void 0);
|
|
126
127
|
__decorate([
|
|
127
128
|
(0, sequelize_typescript_1.Column)({
|
|
128
|
-
type: sequelize_typescript_1.DataType.GEOMETRY(
|
|
129
|
+
type: sequelize_typescript_1.DataType.GEOMETRY("LINESTRING", 4326),
|
|
129
130
|
allowNull: true,
|
|
130
131
|
}),
|
|
131
132
|
__metadata("design:type", Object)
|
|
@@ -236,11 +237,33 @@ __decorate([
|
|
|
236
237
|
__metadata("design:type", String)
|
|
237
238
|
], Trip.prototype, "notes", void 0);
|
|
238
239
|
__decorate([
|
|
239
|
-
(0, sequelize_typescript_1.
|
|
240
|
+
(0, sequelize_typescript_1.ForeignKey)(() => trip_beneficiary_entity_1.TripBeneficiary),
|
|
241
|
+
(0, sequelize_typescript_1.Column)({
|
|
242
|
+
type: sequelize_typescript_1.DataType.UUID,
|
|
243
|
+
allowNull: true,
|
|
244
|
+
}),
|
|
245
|
+
__metadata("design:type", String)
|
|
246
|
+
], Trip.prototype, "requestedFor", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, sequelize_typescript_1.Column)({
|
|
249
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
250
|
+
allowNull: true,
|
|
251
|
+
}),
|
|
252
|
+
__metadata("design:type", String)
|
|
253
|
+
], Trip.prototype, "beneficiaryName", void 0);
|
|
254
|
+
__decorate([
|
|
255
|
+
(0, sequelize_typescript_1.Column)({
|
|
256
|
+
type: sequelize_typescript_1.DataType.STRING,
|
|
257
|
+
allowNull: true,
|
|
258
|
+
}),
|
|
259
|
+
__metadata("design:type", String)
|
|
260
|
+
], Trip.prototype, "beneficiaryPhone", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User, "passengerId"),
|
|
240
263
|
__metadata("design:type", user_entity_1.User)
|
|
241
264
|
], Trip.prototype, "passenger", void 0);
|
|
242
265
|
__decorate([
|
|
243
|
-
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User,
|
|
266
|
+
(0, sequelize_typescript_1.BelongsTo)(() => user_entity_1.User, "driverId"),
|
|
244
267
|
__metadata("design:type", user_entity_1.User)
|
|
245
268
|
], Trip.prototype, "driver", void 0);
|
|
246
269
|
__decorate([
|
|
@@ -248,27 +271,27 @@ __decorate([
|
|
|
248
271
|
__metadata("design:type", vehicle_entity_1.Vehicle)
|
|
249
272
|
], Trip.prototype, "vehicle", void 0);
|
|
250
273
|
__decorate([
|
|
251
|
-
(0, sequelize_typescript_1.HasMany)(() => triplocation_entity_1.TripLocation,
|
|
274
|
+
(0, sequelize_typescript_1.HasMany)(() => triplocation_entity_1.TripLocation, "tripId"),
|
|
252
275
|
__metadata("design:type", Array)
|
|
253
276
|
], Trip.prototype, "locations", void 0);
|
|
254
277
|
__decorate([
|
|
255
|
-
(0, sequelize_typescript_1.HasMany)(() => raitings_entity_1.Rating,
|
|
278
|
+
(0, sequelize_typescript_1.HasMany)(() => raitings_entity_1.Rating, "tripId"),
|
|
256
279
|
__metadata("design:type", Array)
|
|
257
280
|
], Trip.prototype, "ratings", void 0);
|
|
258
281
|
__decorate([
|
|
259
|
-
(0, sequelize_typescript_1.HasMany)(() => payments_entity_1.Payment,
|
|
282
|
+
(0, sequelize_typescript_1.HasMany)(() => payments_entity_1.Payment, "tripId"),
|
|
260
283
|
__metadata("design:type", Array)
|
|
261
284
|
], Trip.prototype, "payments", void 0);
|
|
262
285
|
__decorate([
|
|
263
|
-
(0, sequelize_typescript_1.HasMany)(() => walletTransaction_entity_1.WalletTransaction,
|
|
286
|
+
(0, sequelize_typescript_1.HasMany)(() => walletTransaction_entity_1.WalletTransaction, "tripId"),
|
|
264
287
|
__metadata("design:type", Array)
|
|
265
288
|
], Trip.prototype, "walletTransactions", void 0);
|
|
266
289
|
__decorate([
|
|
267
|
-
(0, sequelize_typescript_1.HasMany)(() => trip_stop_entity_1.TripStop,
|
|
290
|
+
(0, sequelize_typescript_1.HasMany)(() => trip_stop_entity_1.TripStop, "tripId"),
|
|
268
291
|
__metadata("design:type", Array)
|
|
269
292
|
], Trip.prototype, "stops", void 0);
|
|
270
293
|
__decorate([
|
|
271
|
-
(0, sequelize_typescript_1.HasMany)(() => trip_route_change_entity_1.TripRouteChange,
|
|
294
|
+
(0, sequelize_typescript_1.HasMany)(() => trip_route_change_entity_1.TripRouteChange, "tripId"),
|
|
272
295
|
__metadata("design:type", Array)
|
|
273
296
|
], Trip.prototype, "routeChanges", void 0);
|
|
274
297
|
__decorate([
|
|
@@ -288,11 +311,11 @@ __decorate([
|
|
|
288
311
|
__metadata("design:type", String)
|
|
289
312
|
], Trip.prototype, "destinationAddressId", void 0);
|
|
290
313
|
__decorate([
|
|
291
|
-
(0, sequelize_typescript_1.BelongsTo)(() => address_entity_1.UserAddress,
|
|
314
|
+
(0, sequelize_typescript_1.BelongsTo)(() => address_entity_1.UserAddress, "pickupAddressId"),
|
|
292
315
|
__metadata("design:type", address_entity_1.UserAddress)
|
|
293
316
|
], Trip.prototype, "pickupSavedAddress", void 0);
|
|
294
317
|
__decorate([
|
|
295
|
-
(0, sequelize_typescript_1.BelongsTo)(() => address_entity_1.UserAddress,
|
|
318
|
+
(0, sequelize_typescript_1.BelongsTo)(() => address_entity_1.UserAddress, "destinationAddressId"),
|
|
296
319
|
__metadata("design:type", address_entity_1.UserAddress)
|
|
297
320
|
], Trip.prototype, "destinationSavedAddress", void 0);
|
|
298
321
|
__decorate([
|
|
@@ -318,12 +341,16 @@ __decorate([
|
|
|
318
341
|
__metadata("design:type", Number)
|
|
319
342
|
], Trip.prototype, "originalFare", void 0);
|
|
320
343
|
__decorate([
|
|
321
|
-
(0, sequelize_typescript_1.BelongsTo)(() => coupon_entity_1.Coupon,
|
|
344
|
+
(0, sequelize_typescript_1.BelongsTo)(() => coupon_entity_1.Coupon, "appliedCouponId"),
|
|
322
345
|
__metadata("design:type", coupon_entity_1.Coupon)
|
|
323
346
|
], Trip.prototype, "appliedCoupon", void 0);
|
|
347
|
+
__decorate([
|
|
348
|
+
(0, sequelize_typescript_1.BelongsTo)(() => trip_beneficiary_entity_1.TripBeneficiary, "requestedFor"),
|
|
349
|
+
__metadata("design:type", trip_beneficiary_entity_1.TripBeneficiary)
|
|
350
|
+
], Trip.prototype, "beneficiary", void 0);
|
|
324
351
|
exports.Trip = Trip = __decorate([
|
|
325
352
|
(0, sequelize_typescript_1.Table)({
|
|
326
|
-
tableName:
|
|
353
|
+
tableName: "trips",
|
|
327
354
|
timestamps: true,
|
|
328
355
|
})
|
|
329
356
|
], Trip);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trips.entity.js","sourceRoot":"","sources":["../../src/entities/trips.entity.ts"],"names":[],"mappings":";AAAA,gDAAgD;AAChD,aAAa;AACb,gDAAgD;;;;;;;;;;;;AAEhD,+DAQ8B;AAC9B,+CAAqC;AACrC,qDAA2C;AAC3C,+DAAqD;AACrD,uDAA2C;AAC3C,uDAA4C;AAC5C,yEAA+D;AAC/D,qDAA+C;AAC/C,mDAAyC;AACzC,oCAAsC;AACtC,yDAA8C;AAC9C,yEAA6D;
|
|
1
|
+
{"version":3,"file":"trips.entity.js","sourceRoot":"","sources":["../../src/entities/trips.entity.ts"],"names":[],"mappings":";AAAA,gDAAgD;AAChD,aAAa;AACb,gDAAgD;;;;;;;;;;;;AAEhD,+DAQ8B;AAC9B,+CAAqC;AACrC,qDAA2C;AAC3C,+DAAqD;AACrD,uDAA2C;AAC3C,uDAA4C;AAC5C,yEAA+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IAAI,EAAE,+BAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,SAAS,EAAE,IAAI;KAChB,CAAC;;0CACmB;AAIrB;IADC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,iBAAiB,CAAC;8BAC5B,sBAAM;2CAAC;AAItB;IADC,IAAA,gCAAS,EAAC,GAAG,EAAE,CAAC,yCAAe,EAAE,cAAc,CAAC;8BACpC,yCAAe;yCAAC;eAxRlB,IAAI;IAJhB,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,IAAI;KACjB,CAAC;GACW,IAAI,CAyRhB"}
|
|
@@ -35,7 +35,17 @@ interface UserCreationAttrs {
|
|
|
35
35
|
motherLastName?: string;
|
|
36
36
|
email: string;
|
|
37
37
|
phoneNumber: string;
|
|
38
|
+
password?: string;
|
|
39
|
+
roleId?: string;
|
|
40
|
+
status?: UserStatus;
|
|
41
|
+
verificationToken?: string | null;
|
|
42
|
+
isEmailVerified?: boolean;
|
|
43
|
+
isPhoneVerified?: boolean;
|
|
44
|
+
lastLoginAt?: Date;
|
|
45
|
+
profilePicture?: string;
|
|
38
46
|
dateOfBirth?: Date;
|
|
47
|
+
refreshToken?: string;
|
|
48
|
+
rating?: number;
|
|
39
49
|
}
|
|
40
50
|
export declare class User extends Model<UserAttributes, UserCreationAttrs> {
|
|
41
51
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EAQN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM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EAAE,CAAC;IAGpB,YAAY,EAAE,MAAM,EAAE,CAAC;IAGvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAG1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IAGpB,aAAa,EAAE,YAAY,EAAE,CAAC;IAG9B,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAW8B;AAC9B,iDAAsC;AACtC,iDAAsC;AACtC,uDAA2C;AAC3C,uDAA4C;AAC5C,iEAAsD;AACtD,mDAAyC;AACzC,qDAA+C;AAC/C,oCAAsC;
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAW8B;AAC9B,iDAAsC;AACtC,iDAAsC;AACtC,uDAA2C;AAC3C,uDAA4C;AAC5C,iEAAsD;AACtD,mDAAyC;AACzC,qDAA+C;AAC/C,oCAAsC;AAmD/B,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,4BAAwC;CA4IjE,CAAA;AA5IY,oBAAI;AAMP;IALP,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,YAAY,EAAE,+BAAQ,CAAC,MAAM;QAC7B,UAAU,EAAE,IAAI;KACjB,CAAC;;gCACiB;AAMnB;IAJC,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,SAAS,EAAE,KAAK;KACjB,CAAC;;uCACgB;AAMlB;IAJC,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,SAAS,EAAE,KAAK;KACjB,CAAC;;sCACe;AAMjB;IAJC,IAAA,6BAAM,EAAC;QACN,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,SAAS,EAAE,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E,CAAC,mCAAY,EAAE,QAAQ,CAAC;;2CACR;AAG9B;IADC,IAAA,8BAAO,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,QAAQ,CAAC;8BACxB,sBAAM;oCAAC;eA3IJ,IAAI;IALhB,IAAA,4BAAK,EAAC;QACL,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI,EAAE,eAAe;KAChC,CAAC;GACW,IAAI,CA4IhB"}
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// COUPON MODEL
|
|
3
3
|
// =============================================
|
|
4
4
|
|
|
5
|
-
import { Column, DataType, HasMany, Table, Model } from
|
|
6
|
-
import { CouponUsage } from
|
|
7
|
-
import { CouponUserMapping } from
|
|
8
|
-
import { CouponApplicability, CouponStatus, CouponType } from
|
|
5
|
+
import { Column, DataType, HasMany, Table, Model } from "sequelize-typescript";
|
|
6
|
+
import { CouponUsage } from "./coupon_usages.entity";
|
|
7
|
+
import { CouponUserMapping } from "./coupon_user_mappings.entity";
|
|
8
|
+
import { CouponApplicability, CouponStatus, CouponType } from "../enums";
|
|
9
9
|
|
|
10
10
|
// Interface para los atributos de la entidad
|
|
11
11
|
export interface CouponAttributes {
|
|
@@ -63,7 +63,7 @@ export interface CreateCouponData {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
@Table({
|
|
66
|
-
tableName:
|
|
66
|
+
tableName: "coupons",
|
|
67
67
|
timestamps: true,
|
|
68
68
|
})
|
|
69
69
|
export class Coupon extends Model<CouponAttributes, CreateCouponData> {
|
|
@@ -214,9 +214,9 @@ export class Coupon extends Model<CouponAttributes, CreateCouponData> {
|
|
|
214
214
|
metadata: any; // Información adicional del cupón
|
|
215
215
|
|
|
216
216
|
// Associations
|
|
217
|
-
@HasMany(() => CouponUsage,
|
|
217
|
+
@HasMany(() => CouponUsage, "couponId")
|
|
218
218
|
usages: CouponUsage[];
|
|
219
219
|
|
|
220
|
-
@HasMany(() => CouponUserMapping,
|
|
220
|
+
@HasMany(() => CouponUserMapping, "couponId")
|
|
221
221
|
userMappings: CouponUserMapping[];
|
|
222
222
|
}
|
package/src/entities/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from "./coupon_user_mappings.entity";
|
|
|
24
24
|
export * from "./promotion_camping";
|
|
25
25
|
export * from "./trip-route-change.entity";
|
|
26
26
|
export * from "./trip-stop.entity";
|
|
27
|
+
export * from "./trip-beneficiary.entity";
|
|
27
28
|
export * from "./userCard.entity";
|
|
28
29
|
export * from "./supportticket-history.entity";
|
|
29
30
|
export * from "./supportticket-comment.entity";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// =============================================
|
|
2
|
+
// TRIP BENEFICIARY MODEL
|
|
3
|
+
// =============================================
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
BelongsTo,
|
|
7
|
+
Column,
|
|
8
|
+
DataType,
|
|
9
|
+
ForeignKey,
|
|
10
|
+
HasMany,
|
|
11
|
+
Model,
|
|
12
|
+
Table,
|
|
13
|
+
} from "sequelize-typescript";
|
|
14
|
+
import { Trip } from "./trips.entity";
|
|
15
|
+
|
|
16
|
+
// Interface para los atributos de la entidad
|
|
17
|
+
export interface TripBeneficiaryAttributes {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
phone: string;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Interface para crear un nuevo beneficiario
|
|
26
|
+
export interface CreateTripBeneficiaryData {
|
|
27
|
+
name: string;
|
|
28
|
+
phone: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@Table({
|
|
32
|
+
tableName: "trip_beneficiaries",
|
|
33
|
+
timestamps: true,
|
|
34
|
+
})
|
|
35
|
+
export class TripBeneficiary extends Model<
|
|
36
|
+
TripBeneficiaryAttributes,
|
|
37
|
+
CreateTripBeneficiaryData
|
|
38
|
+
> {
|
|
39
|
+
@Column({
|
|
40
|
+
type: DataType.UUID,
|
|
41
|
+
defaultValue: DataType.UUIDV4,
|
|
42
|
+
primaryKey: true,
|
|
43
|
+
})
|
|
44
|
+
declare id: string;
|
|
45
|
+
|
|
46
|
+
@Column({
|
|
47
|
+
type: DataType.STRING,
|
|
48
|
+
allowNull: false,
|
|
49
|
+
})
|
|
50
|
+
name: string;
|
|
51
|
+
|
|
52
|
+
@Column({
|
|
53
|
+
type: DataType.STRING,
|
|
54
|
+
allowNull: false,
|
|
55
|
+
})
|
|
56
|
+
phone: string;
|
|
57
|
+
|
|
58
|
+
// Associations
|
|
59
|
+
@HasMany(() => Trip, "requestedFor")
|
|
60
|
+
trips: Trip[];
|
|
61
|
+
}
|
|
@@ -9,28 +9,28 @@ import {
|
|
|
9
9
|
ForeignKey,
|
|
10
10
|
Model,
|
|
11
11
|
Table,
|
|
12
|
-
} from
|
|
13
|
-
import { Trip } from
|
|
14
|
-
import { User } from
|
|
12
|
+
} from "sequelize-typescript";
|
|
13
|
+
import { Trip } from "./trips.entity";
|
|
14
|
+
import { User } from "./user.entity";
|
|
15
15
|
|
|
16
16
|
export enum RouteChangeType {
|
|
17
|
-
ADD_STOP =
|
|
18
|
-
REMOVE_STOP =
|
|
19
|
-
REORDER_STOPS =
|
|
20
|
-
CHANGE_DESTINATION =
|
|
21
|
-
CHANGE_PICKUP =
|
|
22
|
-
ADD_WAYPOINT =
|
|
23
|
-
REMOVE_WAYPOINT =
|
|
24
|
-
DETOUR =
|
|
25
|
-
REROUTE =
|
|
17
|
+
ADD_STOP = "add_stop",
|
|
18
|
+
REMOVE_STOP = "remove_stop",
|
|
19
|
+
REORDER_STOPS = "reorder_stops",
|
|
20
|
+
CHANGE_DESTINATION = "change_destination",
|
|
21
|
+
CHANGE_PICKUP = "change_pickup",
|
|
22
|
+
ADD_WAYPOINT = "add_waypoint",
|
|
23
|
+
REMOVE_WAYPOINT = "remove_waypoint",
|
|
24
|
+
DETOUR = "detour",
|
|
25
|
+
REROUTE = "reroute",
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export enum RouteChangeStatus {
|
|
29
|
-
PENDING =
|
|
30
|
-
APPROVED =
|
|
31
|
-
REJECTED =
|
|
32
|
-
CANCELLED =
|
|
33
|
-
IMPLEMENTED =
|
|
29
|
+
PENDING = "pending",
|
|
30
|
+
APPROVED = "approved",
|
|
31
|
+
REJECTED = "rejected",
|
|
32
|
+
CANCELLED = "cancelled",
|
|
33
|
+
IMPLEMENTED = "implemented",
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// Interface para los atributos de la entidad
|
|
@@ -87,16 +87,16 @@ export interface CreateTripRouteChangeData {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
@Table({
|
|
90
|
-
tableName:
|
|
90
|
+
tableName: "trip_route_changes",
|
|
91
91
|
timestamps: true,
|
|
92
92
|
indexes: [
|
|
93
93
|
{
|
|
94
|
-
name:
|
|
95
|
-
fields: [
|
|
94
|
+
name: "trip_route_changes_trip_created_idx",
|
|
95
|
+
fields: ["tripId", "createdAt"],
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
name:
|
|
99
|
-
fields: [
|
|
98
|
+
name: "trip_route_changes_status_idx",
|
|
99
|
+
fields: ["status"],
|
|
100
100
|
},
|
|
101
101
|
],
|
|
102
102
|
})
|
|
@@ -244,9 +244,9 @@ export class TripRouteChange extends Model<
|
|
|
244
244
|
@BelongsTo(() => Trip)
|
|
245
245
|
trip: Trip;
|
|
246
246
|
|
|
247
|
-
@BelongsTo(() => User,
|
|
247
|
+
@BelongsTo(() => User, "requestedBy")
|
|
248
248
|
requester: User;
|
|
249
249
|
|
|
250
|
-
@BelongsTo(() => User,
|
|
250
|
+
@BelongsTo(() => User, "approvedBy")
|
|
251
251
|
approver: User;
|
|
252
252
|
}
|
|
@@ -10,18 +10,19 @@ import {
|
|
|
10
10
|
HasMany,
|
|
11
11
|
Model,
|
|
12
12
|
Table,
|
|
13
|
-
} from
|
|
14
|
-
import { User } from
|
|
15
|
-
import { Vehicle } from
|
|
16
|
-
import { TripLocation } from
|
|
17
|
-
import { Rating } from
|
|
18
|
-
import { Payment } from
|
|
19
|
-
import { WalletTransaction } from
|
|
20
|
-
import { UserAddress } from
|
|
21
|
-
import { Coupon } from
|
|
22
|
-
import { TripStatus } from
|
|
23
|
-
import { TripStop } from
|
|
24
|
-
import { TripRouteChange } from
|
|
13
|
+
} from "sequelize-typescript";
|
|
14
|
+
import { User } from "./user.entity";
|
|
15
|
+
import { Vehicle } from "./vehicle.entity";
|
|
16
|
+
import { TripLocation } from "./triplocation.entity";
|
|
17
|
+
import { Rating } from "./raitings.entity";
|
|
18
|
+
import { Payment } from "./payments.entity";
|
|
19
|
+
import { WalletTransaction } from "./walletTransaction.entity";
|
|
20
|
+
import { UserAddress } from "./address.entity";
|
|
21
|
+
import { Coupon } from "./coupon.entity";
|
|
22
|
+
import { TripStatus } from "../enums";
|
|
23
|
+
import { TripStop } from "./trip-stop.entity";
|
|
24
|
+
import { TripRouteChange } from "./trip-route-change.entity";
|
|
25
|
+
import { TripBeneficiary } from "./trip-beneficiary.entity";
|
|
25
26
|
|
|
26
27
|
// Interface para los atributos de la entidad
|
|
27
28
|
export interface TripAttributes {
|
|
@@ -59,13 +60,18 @@ export interface TripAttributes {
|
|
|
59
60
|
appliedCouponId: string;
|
|
60
61
|
discountAmount: number;
|
|
61
62
|
originalFare: number;
|
|
63
|
+
// NUEVO CAMPO PARA VIAJES PARA OTROS
|
|
64
|
+
requestedFor: string;
|
|
65
|
+
// CAMPOS DE RESPALDO DEL BENEFICIARIO
|
|
66
|
+
beneficiaryName: string;
|
|
67
|
+
beneficiaryPhone: string;
|
|
62
68
|
createdAt: Date;
|
|
63
69
|
updatedAt: Date;
|
|
64
70
|
}
|
|
65
71
|
|
|
66
72
|
// Interface para crear un nuevo viaje
|
|
67
73
|
export interface CreateTripData {
|
|
68
|
-
passengerId: string;
|
|
74
|
+
passengerId: string; // Quien solicita el viaje (requerido)
|
|
69
75
|
driverId?: string;
|
|
70
76
|
vehicleId?: string;
|
|
71
77
|
pickupAddress: string;
|
|
@@ -78,10 +84,15 @@ export interface CreateTripData {
|
|
|
78
84
|
destinationAddressId?: string;
|
|
79
85
|
appliedCouponId?: string;
|
|
80
86
|
notes?: string;
|
|
87
|
+
// NUEVO CAMPO PARA VIAJES PARA OTROS
|
|
88
|
+
requestedFor?: string; // ID del beneficiario (opcional)
|
|
89
|
+
// CAMPOS DE RESPALDO DEL BENEFICIARIO (opcionales)
|
|
90
|
+
beneficiaryName?: string;
|
|
91
|
+
beneficiaryPhone?: string;
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
@Table({
|
|
84
|
-
tableName:
|
|
95
|
+
tableName: "trips",
|
|
85
96
|
timestamps: true,
|
|
86
97
|
})
|
|
87
98
|
export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
@@ -95,7 +106,7 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
95
106
|
@ForeignKey(() => User)
|
|
96
107
|
@Column({
|
|
97
108
|
type: DataType.UUID,
|
|
98
|
-
allowNull: false,
|
|
109
|
+
allowNull: false, // Quien solicita el viaje (requerido)
|
|
99
110
|
})
|
|
100
111
|
passengerId: string;
|
|
101
112
|
|
|
@@ -127,7 +138,7 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
127
138
|
|
|
128
139
|
// ACTUALIZADO: Usar GEOMETRY POINT para pickup
|
|
129
140
|
@Column({
|
|
130
|
-
type: DataType.GEOMETRY(
|
|
141
|
+
type: DataType.GEOMETRY("POINT", 4326),
|
|
131
142
|
allowNull: false,
|
|
132
143
|
})
|
|
133
144
|
pickupLocation: any; // POINT(longitude, latitude)
|
|
@@ -153,7 +164,7 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
153
164
|
|
|
154
165
|
// ACTUALIZADO: Usar GEOMETRY POINT para destino
|
|
155
166
|
@Column({
|
|
156
|
-
type: DataType.GEOMETRY(
|
|
167
|
+
type: DataType.GEOMETRY("POINT", 4326),
|
|
157
168
|
allowNull: false,
|
|
158
169
|
})
|
|
159
170
|
destinationLocation: any; // POINT(longitude, latitude)
|
|
@@ -173,7 +184,7 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
173
184
|
|
|
174
185
|
// NUEVO: Ruta completa del viaje (para tracking detallado)
|
|
175
186
|
@Column({
|
|
176
|
-
type: DataType.GEOMETRY(
|
|
187
|
+
type: DataType.GEOMETRY("LINESTRING", 4326),
|
|
177
188
|
allowNull: true,
|
|
178
189
|
})
|
|
179
190
|
routePath: any; // LINESTRING para la ruta completa
|
|
@@ -268,33 +279,54 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
268
279
|
})
|
|
269
280
|
notes: string;
|
|
270
281
|
|
|
282
|
+
// NUEVO CAMPO PARA VIAJES PARA OTROS
|
|
283
|
+
@ForeignKey(() => TripBeneficiary)
|
|
284
|
+
@Column({
|
|
285
|
+
type: DataType.UUID,
|
|
286
|
+
allowNull: true,
|
|
287
|
+
})
|
|
288
|
+
requestedFor: string; // ID del beneficiario para quien es el viaje (opcional)
|
|
289
|
+
|
|
290
|
+
// CAMPOS DE RESPALDO DEL BENEFICIARIO (para mantener historial)
|
|
291
|
+
@Column({
|
|
292
|
+
type: DataType.STRING,
|
|
293
|
+
allowNull: true,
|
|
294
|
+
})
|
|
295
|
+
beneficiaryName: string; // Nombre del beneficiario (respaldo)
|
|
296
|
+
|
|
297
|
+
@Column({
|
|
298
|
+
type: DataType.STRING,
|
|
299
|
+
allowNull: true,
|
|
300
|
+
})
|
|
301
|
+
beneficiaryPhone: string; // Teléfono del beneficiario (respaldo)
|
|
302
|
+
|
|
271
303
|
// Associations
|
|
272
|
-
@BelongsTo(() => User,
|
|
304
|
+
@BelongsTo(() => User, "passengerId")
|
|
273
305
|
passenger: User;
|
|
274
306
|
|
|
275
|
-
@BelongsTo(() => User,
|
|
307
|
+
@BelongsTo(() => User, "driverId")
|
|
276
308
|
driver: User;
|
|
277
309
|
|
|
278
310
|
@BelongsTo(() => Vehicle)
|
|
279
311
|
vehicle: Vehicle;
|
|
280
312
|
|
|
281
|
-
@HasMany(() => TripLocation,
|
|
313
|
+
@HasMany(() => TripLocation, "tripId")
|
|
282
314
|
locations: TripLocation[];
|
|
283
315
|
|
|
284
|
-
@HasMany(() => Rating,
|
|
316
|
+
@HasMany(() => Rating, "tripId")
|
|
285
317
|
ratings: Rating[];
|
|
286
318
|
|
|
287
|
-
@HasMany(() => Payment,
|
|
319
|
+
@HasMany(() => Payment, "tripId")
|
|
288
320
|
payments: Payment[];
|
|
289
321
|
|
|
290
|
-
@HasMany(() => WalletTransaction,
|
|
322
|
+
@HasMany(() => WalletTransaction, "tripId")
|
|
291
323
|
walletTransactions: WalletTransaction[];
|
|
292
324
|
|
|
293
325
|
// NUEVAS ASOCIACIONES PARA MÚLTIPLES PARADAS Y CAMBIOS DE RUTA
|
|
294
|
-
@HasMany(() => TripStop,
|
|
326
|
+
@HasMany(() => TripStop, "tripId")
|
|
295
327
|
stops: TripStop[];
|
|
296
328
|
|
|
297
|
-
@HasMany(() => TripRouteChange,
|
|
329
|
+
@HasMany(() => TripRouteChange, "tripId")
|
|
298
330
|
routeChanges: TripRouteChange[];
|
|
299
331
|
|
|
300
332
|
@ForeignKey(() => UserAddress)
|
|
@@ -312,10 +344,10 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
312
344
|
destinationAddressId: string; // Referencia a dirección guardada del usuario
|
|
313
345
|
|
|
314
346
|
// Associations
|
|
315
|
-
@BelongsTo(() => UserAddress,
|
|
347
|
+
@BelongsTo(() => UserAddress, "pickupAddressId")
|
|
316
348
|
pickupSavedAddress: UserAddress;
|
|
317
349
|
|
|
318
|
-
@BelongsTo(() => UserAddress,
|
|
350
|
+
@BelongsTo(() => UserAddress, "destinationAddressId")
|
|
319
351
|
destinationSavedAddress: UserAddress;
|
|
320
352
|
|
|
321
353
|
@ForeignKey(() => Coupon)
|
|
@@ -338,6 +370,10 @@ export class Trip extends Model<TripAttributes, CreateTripData> {
|
|
|
338
370
|
originalFare: number; // Tarifa original antes del descuento
|
|
339
371
|
|
|
340
372
|
// Association
|
|
341
|
-
@BelongsTo(() => Coupon,
|
|
373
|
+
@BelongsTo(() => Coupon, "appliedCouponId")
|
|
342
374
|
appliedCoupon: Coupon;
|
|
375
|
+
|
|
376
|
+
// NUEVA ASOCIACIÓN PARA EL BENEFICIARIO DEL VIAJE
|
|
377
|
+
@BelongsTo(() => TripBeneficiary, "requestedFor")
|
|
378
|
+
beneficiary: TripBeneficiary;
|
|
343
379
|
}
|
|
@@ -50,7 +50,17 @@ interface UserCreationAttrs {
|
|
|
50
50
|
motherLastName?: string;
|
|
51
51
|
email: string;
|
|
52
52
|
phoneNumber: string;
|
|
53
|
+
password?: string;
|
|
54
|
+
roleId?: string;
|
|
55
|
+
status?: UserStatus;
|
|
56
|
+
verificationToken?: string | null;
|
|
57
|
+
isEmailVerified?: boolean;
|
|
58
|
+
isPhoneVerified?: boolean;
|
|
59
|
+
lastLoginAt?: Date;
|
|
60
|
+
profilePicture?: string;
|
|
53
61
|
dateOfBirth?: Date;
|
|
62
|
+
refreshToken?: string;
|
|
63
|
+
rating?: number;
|
|
54
64
|
}
|
|
55
65
|
|
|
56
66
|
@Table({
|