@mac777/project-pinecone-models 1.0.4 → 1.0.6
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/Event.d.ts +3 -3
- package/dist/Event.js +1 -1
- package/dist/Event_Views.d.ts +20 -0
- package/dist/Event_Views.js +11 -0
- package/dist/Order.d.ts +6 -6
- package/dist/Ticket.d.ts +3 -3
- package/package.json +1 -1
- package/src/Event.ts +1 -1
- package/src/Event_Views.ts +8 -0
package/dist/Event.d.ts
CHANGED
|
@@ -197,7 +197,7 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
197
197
|
ticketsSold: number;
|
|
198
198
|
revenue: number;
|
|
199
199
|
checkIns: number;
|
|
200
|
-
uniqueViewers:
|
|
200
|
+
uniqueViewers: string[];
|
|
201
201
|
reviewCount: number;
|
|
202
202
|
conversionRate: number;
|
|
203
203
|
lastViewedAt?: NativeDate | null | undefined;
|
|
@@ -464,7 +464,7 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
464
464
|
ticketsSold: number;
|
|
465
465
|
revenue: number;
|
|
466
466
|
checkIns: number;
|
|
467
|
-
uniqueViewers:
|
|
467
|
+
uniqueViewers: string[];
|
|
468
468
|
reviewCount: number;
|
|
469
469
|
conversionRate: number;
|
|
470
470
|
lastViewedAt?: NativeDate | null | undefined;
|
|
@@ -731,7 +731,7 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
731
731
|
ticketsSold: number;
|
|
732
732
|
revenue: number;
|
|
733
733
|
checkIns: number;
|
|
734
|
-
uniqueViewers:
|
|
734
|
+
uniqueViewers: string[];
|
|
735
735
|
reviewCount: number;
|
|
736
736
|
conversionRate: number;
|
|
737
737
|
lastViewedAt?: NativeDate | null | undefined;
|
package/dist/Event.js
CHANGED
|
@@ -109,7 +109,7 @@ const metricsSchema = new mongoose_1.default.Schema({
|
|
|
109
109
|
revenue: { type: Number, default: 0 },
|
|
110
110
|
checkIns: { type: Number, default: 0 },
|
|
111
111
|
uniqueViewers: {
|
|
112
|
-
type: [
|
|
112
|
+
type: [String],
|
|
113
113
|
default: []
|
|
114
114
|
},
|
|
115
115
|
lastViewedAt: Date, // for trending calculation
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
declare const eventViewsSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
+
timestamps: true;
|
|
4
|
+
}, {
|
|
5
|
+
eventId: mongoose.Types.ObjectId;
|
|
6
|
+
userId: mongoose.Types.ObjectId;
|
|
7
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
8
|
+
eventId: mongoose.Types.ObjectId;
|
|
9
|
+
userId: mongoose.Types.ObjectId;
|
|
10
|
+
} & mongoose.DefaultTimestampProps>, {}, mongoose.ResolveSchemaOptions<{
|
|
11
|
+
timestamps: true;
|
|
12
|
+
}>> & mongoose.FlatRecord<{
|
|
13
|
+
eventId: mongoose.Types.ObjectId;
|
|
14
|
+
userId: mongoose.Types.ObjectId;
|
|
15
|
+
} & mongoose.DefaultTimestampProps> & {
|
|
16
|
+
_id: mongoose.Types.ObjectId;
|
|
17
|
+
} & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}>;
|
|
20
|
+
export default eventViewsSchema;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const eventViewsSchema = new mongoose_1.default.Schema({
|
|
8
|
+
eventId: { type: mongoose_1.default.Schema.Types.ObjectId, ref: 'Event', required: true, index: true },
|
|
9
|
+
userId: { type: mongoose_1.default.Schema.Types.ObjectId, ref: 'User', required: true, index: true },
|
|
10
|
+
}, { timestamps: true });
|
|
11
|
+
exports.default = eventViewsSchema;
|
package/dist/Order.d.ts
CHANGED
|
@@ -21,10 +21,10 @@ declare const orderSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
21
21
|
pricePerTicket: number;
|
|
22
22
|
subtotal: number;
|
|
23
23
|
}>;
|
|
24
|
-
|
|
24
|
+
eventId: mongoose.Types.ObjectId;
|
|
25
25
|
userId: mongoose.Types.ObjectId;
|
|
26
|
+
expiresAt: NativeDate;
|
|
26
27
|
orderNumber: string;
|
|
27
|
-
eventId: mongoose.Types.ObjectId;
|
|
28
28
|
requiresManualReview: boolean;
|
|
29
29
|
manualReviewReason: string;
|
|
30
30
|
paymentMethod: "card" | "bkash" | "bank_transfer";
|
|
@@ -76,10 +76,10 @@ declare const orderSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
76
76
|
pricePerTicket: number;
|
|
77
77
|
subtotal: number;
|
|
78
78
|
}>;
|
|
79
|
-
|
|
79
|
+
eventId: mongoose.Types.ObjectId;
|
|
80
80
|
userId: mongoose.Types.ObjectId;
|
|
81
|
+
expiresAt: NativeDate;
|
|
81
82
|
orderNumber: string;
|
|
82
|
-
eventId: mongoose.Types.ObjectId;
|
|
83
83
|
requiresManualReview: boolean;
|
|
84
84
|
manualReviewReason: string;
|
|
85
85
|
paymentMethod: "card" | "bkash" | "bank_transfer";
|
|
@@ -131,10 +131,10 @@ declare const orderSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
131
131
|
pricePerTicket: number;
|
|
132
132
|
subtotal: number;
|
|
133
133
|
}>;
|
|
134
|
-
|
|
134
|
+
eventId: mongoose.Types.ObjectId;
|
|
135
135
|
userId: mongoose.Types.ObjectId;
|
|
136
|
+
expiresAt: NativeDate;
|
|
136
137
|
orderNumber: string;
|
|
137
|
-
eventId: mongoose.Types.ObjectId;
|
|
138
138
|
requiresManualReview: boolean;
|
|
139
139
|
manualReviewReason: string;
|
|
140
140
|
paymentMethod: "card" | "bkash" | "bank_transfer";
|
package/dist/Ticket.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import mongoose from 'mongoose';
|
|
|
2
2
|
declare const ticketSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
3
3
|
status: "cancelled" | "refunded" | "valid" | "used" | "transferred";
|
|
4
4
|
price: number;
|
|
5
|
+
eventId: mongoose.Types.ObjectId;
|
|
5
6
|
userId: mongoose.Types.ObjectId;
|
|
6
7
|
ticketVariantId: mongoose.Types.ObjectId;
|
|
7
|
-
eventId: mongoose.Types.ObjectId;
|
|
8
8
|
orderId: mongoose.Types.ObjectId;
|
|
9
9
|
ticketNumber: string;
|
|
10
10
|
eventTitle: string;
|
|
@@ -24,9 +24,9 @@ declare const ticketSchema: mongoose.Schema<any, mongoose.Model<any, any, any, a
|
|
|
24
24
|
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
25
25
|
status: "cancelled" | "refunded" | "valid" | "used" | "transferred";
|
|
26
26
|
price: number;
|
|
27
|
+
eventId: mongoose.Types.ObjectId;
|
|
27
28
|
userId: mongoose.Types.ObjectId;
|
|
28
29
|
ticketVariantId: mongoose.Types.ObjectId;
|
|
29
|
-
eventId: mongoose.Types.ObjectId;
|
|
30
30
|
orderId: mongoose.Types.ObjectId;
|
|
31
31
|
ticketNumber: string;
|
|
32
32
|
eventTitle: string;
|
|
@@ -46,9 +46,9 @@ declare const ticketSchema: mongoose.Schema<any, mongoose.Model<any, any, any, a
|
|
|
46
46
|
}>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<{
|
|
47
47
|
status: "cancelled" | "refunded" | "valid" | "used" | "transferred";
|
|
48
48
|
price: number;
|
|
49
|
+
eventId: mongoose.Types.ObjectId;
|
|
49
50
|
userId: mongoose.Types.ObjectId;
|
|
50
51
|
ticketVariantId: mongoose.Types.ObjectId;
|
|
51
|
-
eventId: mongoose.Types.ObjectId;
|
|
52
52
|
orderId: mongoose.Types.ObjectId;
|
|
53
53
|
ticketNumber: string;
|
|
54
54
|
eventTitle: string;
|
package/package.json
CHANGED
package/src/Event.ts
CHANGED
|
@@ -116,7 +116,7 @@ const metricsSchema = new mongoose.Schema({
|
|
|
116
116
|
revenue: { type: Number, default: 0 },
|
|
117
117
|
checkIns: { type: Number, default: 0 },
|
|
118
118
|
uniqueViewers: {
|
|
119
|
-
type: [
|
|
119
|
+
type: [String],
|
|
120
120
|
default: []
|
|
121
121
|
},
|
|
122
122
|
lastViewedAt: Date, // for trending calculation
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const eventViewsSchema = new mongoose.Schema({
|
|
4
|
+
eventId: { type: mongoose.Schema.Types.ObjectId, ref: 'Event', required: true, index: true },
|
|
5
|
+
userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true, index: true },
|
|
6
|
+
}, { timestamps: true });
|
|
7
|
+
|
|
8
|
+
export default eventViewsSchema;
|