@mac777/project-pinecone-models 1.0.8 → 1.0.10
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 +54 -0
- package/dist/Event.js +8 -1
- package/dist/Payout.d.ts +71 -0
- package/dist/Payout.js +32 -0
- package/dist/User.d.ts +39 -0
- package/dist/User.js +47 -0
- package/package.json +1 -1
- package/src/Event.ts +10 -1
- package/src/Payout.ts +37 -0
- package/src/User.ts +47 -0
package/dist/Event.d.ts
CHANGED
|
@@ -17,8 +17,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
17
17
|
isActive: boolean;
|
|
18
18
|
isVisible: boolean;
|
|
19
19
|
wristbandColor: string;
|
|
20
|
+
accentColor: string;
|
|
21
|
+
isDark: boolean;
|
|
22
|
+
glassMode: boolean;
|
|
23
|
+
cornerRadius: number;
|
|
24
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
20
25
|
benefits: string[];
|
|
21
26
|
tier: string;
|
|
27
|
+
description?: string | null | undefined;
|
|
22
28
|
price?: {
|
|
23
29
|
amount: number;
|
|
24
30
|
currency: string;
|
|
@@ -39,8 +45,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
39
45
|
isActive: boolean;
|
|
40
46
|
isVisible: boolean;
|
|
41
47
|
wristbandColor: string;
|
|
48
|
+
accentColor: string;
|
|
49
|
+
isDark: boolean;
|
|
50
|
+
glassMode: boolean;
|
|
51
|
+
cornerRadius: number;
|
|
52
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
42
53
|
benefits: string[];
|
|
43
54
|
tier: string;
|
|
55
|
+
description?: string | null | undefined;
|
|
44
56
|
price?: {
|
|
45
57
|
amount: number;
|
|
46
58
|
currency: string;
|
|
@@ -61,8 +73,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
61
73
|
isActive: boolean;
|
|
62
74
|
isVisible: boolean;
|
|
63
75
|
wristbandColor: string;
|
|
76
|
+
accentColor: string;
|
|
77
|
+
isDark: boolean;
|
|
78
|
+
glassMode: boolean;
|
|
79
|
+
cornerRadius: number;
|
|
80
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
64
81
|
benefits: string[];
|
|
65
82
|
tier: string;
|
|
83
|
+
description?: string | null | undefined;
|
|
66
84
|
price?: {
|
|
67
85
|
amount: number;
|
|
68
86
|
currency: string;
|
|
@@ -283,8 +301,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
283
301
|
isActive: boolean;
|
|
284
302
|
isVisible: boolean;
|
|
285
303
|
wristbandColor: string;
|
|
304
|
+
accentColor: string;
|
|
305
|
+
isDark: boolean;
|
|
306
|
+
glassMode: boolean;
|
|
307
|
+
cornerRadius: number;
|
|
308
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
286
309
|
benefits: string[];
|
|
287
310
|
tier: string;
|
|
311
|
+
description?: string | null | undefined;
|
|
288
312
|
price?: {
|
|
289
313
|
amount: number;
|
|
290
314
|
currency: string;
|
|
@@ -305,8 +329,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
305
329
|
isActive: boolean;
|
|
306
330
|
isVisible: boolean;
|
|
307
331
|
wristbandColor: string;
|
|
332
|
+
accentColor: string;
|
|
333
|
+
isDark: boolean;
|
|
334
|
+
glassMode: boolean;
|
|
335
|
+
cornerRadius: number;
|
|
336
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
308
337
|
benefits: string[];
|
|
309
338
|
tier: string;
|
|
339
|
+
description?: string | null | undefined;
|
|
310
340
|
price?: {
|
|
311
341
|
amount: number;
|
|
312
342
|
currency: string;
|
|
@@ -327,8 +357,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
327
357
|
isActive: boolean;
|
|
328
358
|
isVisible: boolean;
|
|
329
359
|
wristbandColor: string;
|
|
360
|
+
accentColor: string;
|
|
361
|
+
isDark: boolean;
|
|
362
|
+
glassMode: boolean;
|
|
363
|
+
cornerRadius: number;
|
|
364
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
330
365
|
benefits: string[];
|
|
331
366
|
tier: string;
|
|
367
|
+
description?: string | null | undefined;
|
|
332
368
|
price?: {
|
|
333
369
|
amount: number;
|
|
334
370
|
currency: string;
|
|
@@ -549,8 +585,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
549
585
|
isActive: boolean;
|
|
550
586
|
isVisible: boolean;
|
|
551
587
|
wristbandColor: string;
|
|
588
|
+
accentColor: string;
|
|
589
|
+
isDark: boolean;
|
|
590
|
+
glassMode: boolean;
|
|
591
|
+
cornerRadius: number;
|
|
592
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
552
593
|
benefits: string[];
|
|
553
594
|
tier: string;
|
|
595
|
+
description?: string | null | undefined;
|
|
554
596
|
price?: {
|
|
555
597
|
amount: number;
|
|
556
598
|
currency: string;
|
|
@@ -571,8 +613,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
571
613
|
isActive: boolean;
|
|
572
614
|
isVisible: boolean;
|
|
573
615
|
wristbandColor: string;
|
|
616
|
+
accentColor: string;
|
|
617
|
+
isDark: boolean;
|
|
618
|
+
glassMode: boolean;
|
|
619
|
+
cornerRadius: number;
|
|
620
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
574
621
|
benefits: string[];
|
|
575
622
|
tier: string;
|
|
623
|
+
description?: string | null | undefined;
|
|
576
624
|
price?: {
|
|
577
625
|
amount: number;
|
|
578
626
|
currency: string;
|
|
@@ -593,8 +641,14 @@ declare const eventSchema: mongoose.Schema<any, mongoose.Model<any, any, any, an
|
|
|
593
641
|
isActive: boolean;
|
|
594
642
|
isVisible: boolean;
|
|
595
643
|
wristbandColor: string;
|
|
644
|
+
accentColor: string;
|
|
645
|
+
isDark: boolean;
|
|
646
|
+
glassMode: boolean;
|
|
647
|
+
cornerRadius: number;
|
|
648
|
+
perforationStyle: "solid" | "dashed" | "dotted";
|
|
596
649
|
benefits: string[];
|
|
597
650
|
tier: string;
|
|
651
|
+
description?: string | null | undefined;
|
|
598
652
|
price?: {
|
|
599
653
|
amount: number;
|
|
600
654
|
currency: string;
|
package/dist/Event.js
CHANGED
|
@@ -79,13 +79,20 @@ const salesWindowSchema = new mongoose_1.default.Schema({
|
|
|
79
79
|
}, { _id: false });
|
|
80
80
|
const ticketSchema = new mongoose_1.default.Schema({
|
|
81
81
|
name: { type: String, required: true },
|
|
82
|
+
description: String,
|
|
82
83
|
price: priceSchema,
|
|
83
84
|
quantity: { type: Number, required: true },
|
|
84
85
|
sold: { type: Number, default: 0 },
|
|
85
86
|
reserved: { type: Number, default: 0 },
|
|
86
87
|
isActive: { type: Boolean, default: true },
|
|
87
88
|
isVisible: { type: Boolean, default: true },
|
|
88
|
-
|
|
89
|
+
// Visual customization
|
|
90
|
+
wristbandColor: { type: String, default: '#4f46e5' },
|
|
91
|
+
accentColor: { type: String, default: '#4f46e5' },
|
|
92
|
+
isDark: { type: Boolean, default: false },
|
|
93
|
+
glassMode: { type: Boolean, default: false },
|
|
94
|
+
cornerRadius: { type: Number, default: 32, min: 0, max: 50 },
|
|
95
|
+
perforationStyle: { type: String, enum: ['solid', 'dashed', 'dotted'], default: 'dotted' },
|
|
89
96
|
limits: {
|
|
90
97
|
minPerOrder: { type: Number, default: 1 },
|
|
91
98
|
maxPerOrder: { type: Number, default: 10 },
|
package/dist/Payout.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
declare const payoutSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
3
|
+
timestamps: true;
|
|
4
|
+
}, {
|
|
5
|
+
createdAt?: NativeDate | null | undefined;
|
|
6
|
+
status?: string | null | undefined;
|
|
7
|
+
amount?: number | null | undefined;
|
|
8
|
+
platformFee?: number | null | undefined;
|
|
9
|
+
hostId?: mongoose.Types.ObjectId | null | undefined;
|
|
10
|
+
eventId?: mongoose.Types.ObjectId | null | undefined;
|
|
11
|
+
paymentFee?: number | null | undefined;
|
|
12
|
+
totalRevenue?: number | null | undefined;
|
|
13
|
+
approvedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
14
|
+
approvedAt?: NativeDate | null | undefined;
|
|
15
|
+
processedAt?: NativeDate | null | undefined;
|
|
16
|
+
completedAt?: NativeDate | null | undefined;
|
|
17
|
+
transactionId?: string | null | undefined;
|
|
18
|
+
notes?: string | null | undefined;
|
|
19
|
+
bankDetails?: {
|
|
20
|
+
method: "bkash" | "bank_transfer" | "nagad" | "upay" | "rocket";
|
|
21
|
+
accountNumber?: string | null | undefined;
|
|
22
|
+
accountName?: string | null | undefined;
|
|
23
|
+
} | null | undefined;
|
|
24
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
25
|
+
createdAt?: NativeDate | null | undefined;
|
|
26
|
+
status?: string | null | undefined;
|
|
27
|
+
amount?: number | null | undefined;
|
|
28
|
+
platformFee?: number | null | undefined;
|
|
29
|
+
hostId?: mongoose.Types.ObjectId | null | undefined;
|
|
30
|
+
eventId?: mongoose.Types.ObjectId | null | undefined;
|
|
31
|
+
paymentFee?: number | null | undefined;
|
|
32
|
+
totalRevenue?: number | null | undefined;
|
|
33
|
+
approvedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
34
|
+
approvedAt?: NativeDate | null | undefined;
|
|
35
|
+
processedAt?: NativeDate | null | undefined;
|
|
36
|
+
completedAt?: NativeDate | null | undefined;
|
|
37
|
+
transactionId?: string | null | undefined;
|
|
38
|
+
notes?: string | null | undefined;
|
|
39
|
+
bankDetails?: {
|
|
40
|
+
method: "bkash" | "bank_transfer" | "nagad" | "upay" | "rocket";
|
|
41
|
+
accountNumber?: string | null | undefined;
|
|
42
|
+
accountName?: string | null | undefined;
|
|
43
|
+
} | null | undefined;
|
|
44
|
+
} & mongoose.DefaultTimestampProps>, {}, mongoose.ResolveSchemaOptions<{
|
|
45
|
+
timestamps: true;
|
|
46
|
+
}>> & mongoose.FlatRecord<{
|
|
47
|
+
createdAt?: NativeDate | null | undefined;
|
|
48
|
+
status?: string | null | undefined;
|
|
49
|
+
amount?: number | null | undefined;
|
|
50
|
+
platformFee?: number | null | undefined;
|
|
51
|
+
hostId?: mongoose.Types.ObjectId | null | undefined;
|
|
52
|
+
eventId?: mongoose.Types.ObjectId | null | undefined;
|
|
53
|
+
paymentFee?: number | null | undefined;
|
|
54
|
+
totalRevenue?: number | null | undefined;
|
|
55
|
+
approvedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
56
|
+
approvedAt?: NativeDate | null | undefined;
|
|
57
|
+
processedAt?: NativeDate | null | undefined;
|
|
58
|
+
completedAt?: NativeDate | null | undefined;
|
|
59
|
+
transactionId?: string | null | undefined;
|
|
60
|
+
notes?: string | null | undefined;
|
|
61
|
+
bankDetails?: {
|
|
62
|
+
method: "bkash" | "bank_transfer" | "nagad" | "upay" | "rocket";
|
|
63
|
+
accountNumber?: string | null | undefined;
|
|
64
|
+
accountName?: string | null | undefined;
|
|
65
|
+
} | null | undefined;
|
|
66
|
+
} & mongoose.DefaultTimestampProps> & {
|
|
67
|
+
_id: mongoose.Types.ObjectId;
|
|
68
|
+
} & {
|
|
69
|
+
__v: number;
|
|
70
|
+
}>;
|
|
71
|
+
export default payoutSchema;
|
package/dist/Payout.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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 payoutSchema = new mongoose_1.default.Schema({
|
|
8
|
+
hostId: mongoose_1.default.Schema.Types.ObjectId,
|
|
9
|
+
eventId: mongoose_1.default.Schema.Types.ObjectId,
|
|
10
|
+
amount: Number, // Host's share
|
|
11
|
+
platformFee: Number, // Your cut
|
|
12
|
+
paymentFee: Number, // bKash fee
|
|
13
|
+
totalRevenue: Number, // Original amount
|
|
14
|
+
status: String, // 'pending', 'approved', 'processing', 'completed', 'failed'
|
|
15
|
+
bankDetails: {
|
|
16
|
+
method: {
|
|
17
|
+
type: String,
|
|
18
|
+
enum: ['bkash', 'nagad', 'upay', 'rocket', 'bank_transfer'],
|
|
19
|
+
default: 'bkash'
|
|
20
|
+
},
|
|
21
|
+
accountNumber: String,
|
|
22
|
+
accountName: String
|
|
23
|
+
},
|
|
24
|
+
approvedBy: mongoose_1.default.Schema.Types.ObjectId, // Admin who approved
|
|
25
|
+
approvedAt: Date,
|
|
26
|
+
processedAt: Date,
|
|
27
|
+
completedAt: Date,
|
|
28
|
+
transactionId: String, // bKash transaction ID
|
|
29
|
+
notes: String, // Admin notes
|
|
30
|
+
createdAt: Date
|
|
31
|
+
}, { timestamps: true });
|
|
32
|
+
exports.default = payoutSchema;
|
package/dist/User.d.ts
CHANGED
|
@@ -7,8 +7,21 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
7
7
|
provider: "google" | "local";
|
|
8
8
|
firstName: string;
|
|
9
9
|
lastName: string;
|
|
10
|
+
emailVerified: boolean;
|
|
11
|
+
phoneVerified: boolean;
|
|
12
|
+
nidVerified: boolean;
|
|
13
|
+
payout?: {
|
|
14
|
+
method: "bkash" | "bank_transfer" | "nagad" | "upay" | "rocket";
|
|
15
|
+
accountNumber?: string | null | undefined;
|
|
16
|
+
} | null | undefined;
|
|
10
17
|
password?: string | null | undefined;
|
|
11
18
|
organization?: string | null | undefined;
|
|
19
|
+
emailVerificationToken?: string | null | undefined;
|
|
20
|
+
emailVerificationExpires?: NativeDate | null | undefined;
|
|
21
|
+
phoneNumber?: string | null | undefined;
|
|
22
|
+
phoneVerificationToken?: string | null | undefined;
|
|
23
|
+
phoneVerificationExpires?: NativeDate | null | undefined;
|
|
24
|
+
nidNumber?: string | null | undefined;
|
|
12
25
|
refreshToken?: string | null | undefined;
|
|
13
26
|
googleId?: string | null | undefined;
|
|
14
27
|
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
@@ -17,8 +30,21 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
17
30
|
provider: "google" | "local";
|
|
18
31
|
firstName: string;
|
|
19
32
|
lastName: string;
|
|
33
|
+
emailVerified: boolean;
|
|
34
|
+
phoneVerified: boolean;
|
|
35
|
+
nidVerified: boolean;
|
|
36
|
+
payout?: {
|
|
37
|
+
method: "bkash" | "bank_transfer" | "nagad" | "upay" | "rocket";
|
|
38
|
+
accountNumber?: string | null | undefined;
|
|
39
|
+
} | null | undefined;
|
|
20
40
|
password?: string | null | undefined;
|
|
21
41
|
organization?: string | null | undefined;
|
|
42
|
+
emailVerificationToken?: string | null | undefined;
|
|
43
|
+
emailVerificationExpires?: NativeDate | null | undefined;
|
|
44
|
+
phoneNumber?: string | null | undefined;
|
|
45
|
+
phoneVerificationToken?: string | null | undefined;
|
|
46
|
+
phoneVerificationExpires?: NativeDate | null | undefined;
|
|
47
|
+
nidNumber?: string | null | undefined;
|
|
22
48
|
refreshToken?: string | null | undefined;
|
|
23
49
|
googleId?: string | null | undefined;
|
|
24
50
|
} & mongoose.DefaultTimestampProps>, {}, mongoose.ResolveSchemaOptions<{
|
|
@@ -29,8 +55,21 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
29
55
|
provider: "google" | "local";
|
|
30
56
|
firstName: string;
|
|
31
57
|
lastName: string;
|
|
58
|
+
emailVerified: boolean;
|
|
59
|
+
phoneVerified: boolean;
|
|
60
|
+
nidVerified: boolean;
|
|
61
|
+
payout?: {
|
|
62
|
+
method: "bkash" | "bank_transfer" | "nagad" | "upay" | "rocket";
|
|
63
|
+
accountNumber?: string | null | undefined;
|
|
64
|
+
} | null | undefined;
|
|
32
65
|
password?: string | null | undefined;
|
|
33
66
|
organization?: string | null | undefined;
|
|
67
|
+
emailVerificationToken?: string | null | undefined;
|
|
68
|
+
emailVerificationExpires?: NativeDate | null | undefined;
|
|
69
|
+
phoneNumber?: string | null | undefined;
|
|
70
|
+
phoneVerificationToken?: string | null | undefined;
|
|
71
|
+
phoneVerificationExpires?: NativeDate | null | undefined;
|
|
72
|
+
nidNumber?: string | null | undefined;
|
|
34
73
|
refreshToken?: string | null | undefined;
|
|
35
74
|
googleId?: string | null | undefined;
|
|
36
75
|
} & mongoose.DefaultTimestampProps> & {
|
package/dist/User.js
CHANGED
|
@@ -26,6 +26,53 @@ const userSchema = new mongoose_1.default.Schema({
|
|
|
26
26
|
type: String,
|
|
27
27
|
required: false
|
|
28
28
|
},
|
|
29
|
+
emailVerified: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
33
|
+
emailVerificationToken: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
emailVerificationExpires: {
|
|
38
|
+
type: Date,
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
phoneNumber: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
phoneVerified: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
phoneVerificationToken: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
phoneVerificationExpires: {
|
|
54
|
+
type: Date,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
nidNumber: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
61
|
+
nidVerified: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
},
|
|
65
|
+
payout: {
|
|
66
|
+
accountNumber: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
70
|
+
method: {
|
|
71
|
+
type: String,
|
|
72
|
+
enum: ['bkash', 'nagad', 'upay', 'rocket', 'bank_transfer'],
|
|
73
|
+
default: 'bkash'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
29
76
|
role: {
|
|
30
77
|
type: String,
|
|
31
78
|
enum: ['user', 'host', 'admin'],
|
package/package.json
CHANGED
package/src/Event.ts
CHANGED
|
@@ -84,13 +84,22 @@ const salesWindowSchema = new mongoose.Schema({
|
|
|
84
84
|
|
|
85
85
|
const ticketSchema = new mongoose.Schema({
|
|
86
86
|
name: { type: String, required: true },
|
|
87
|
+
description: String,
|
|
87
88
|
price: priceSchema,
|
|
88
89
|
quantity: { type: Number, required: true },
|
|
89
90
|
sold: { type: Number, default: 0 },
|
|
90
91
|
reserved: { type: Number, default: 0 },
|
|
91
92
|
isActive: { type: Boolean, default: true },
|
|
92
93
|
isVisible: { type: Boolean, default: true },
|
|
93
|
-
|
|
94
|
+
|
|
95
|
+
// Visual customization
|
|
96
|
+
wristbandColor: { type: String, default: '#4f46e5' },
|
|
97
|
+
accentColor: { type: String, default: '#4f46e5' },
|
|
98
|
+
isDark: { type: Boolean, default: false },
|
|
99
|
+
glassMode: { type: Boolean, default: false },
|
|
100
|
+
cornerRadius: { type: Number, default: 32, min: 0, max: 50 },
|
|
101
|
+
perforationStyle: { type: String, enum: ['solid', 'dashed', 'dotted'], default: 'dotted' },
|
|
102
|
+
|
|
94
103
|
limits: {
|
|
95
104
|
minPerOrder: { type: Number, default: 1 },
|
|
96
105
|
maxPerOrder: { type: Number, default: 10 },
|
package/src/Payout.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const payoutSchema = new mongoose.Schema({
|
|
4
|
+
hostId: mongoose.Schema.Types.ObjectId,
|
|
5
|
+
eventId: mongoose.Schema.Types.ObjectId,
|
|
6
|
+
|
|
7
|
+
amount: Number, // Host's share
|
|
8
|
+
platformFee: Number, // Your cut
|
|
9
|
+
paymentFee: Number, // bKash fee
|
|
10
|
+
totalRevenue: Number, // Original amount
|
|
11
|
+
|
|
12
|
+
status: String, // 'pending', 'approved', 'processing', 'completed', 'failed'
|
|
13
|
+
|
|
14
|
+
bankDetails: {
|
|
15
|
+
method: {
|
|
16
|
+
type: String,
|
|
17
|
+
enum: ['bkash', 'nagad', 'upay', 'rocket', 'bank_transfer'],
|
|
18
|
+
default: 'bkash'
|
|
19
|
+
},
|
|
20
|
+
accountNumber: String,
|
|
21
|
+
accountName: String
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
approvedBy: mongoose.Schema.Types.ObjectId, // Admin who approved
|
|
25
|
+
approvedAt: Date,
|
|
26
|
+
|
|
27
|
+
processedAt: Date,
|
|
28
|
+
completedAt: Date,
|
|
29
|
+
|
|
30
|
+
transactionId: String, // bKash transaction ID
|
|
31
|
+
|
|
32
|
+
notes: String, // Admin notes
|
|
33
|
+
|
|
34
|
+
createdAt: Date
|
|
35
|
+
}, { timestamps: true });
|
|
36
|
+
|
|
37
|
+
export default payoutSchema;
|
package/src/User.ts
CHANGED
|
@@ -22,6 +22,53 @@ const userSchema = new mongoose.Schema({
|
|
|
22
22
|
type: String,
|
|
23
23
|
required: false
|
|
24
24
|
},
|
|
25
|
+
emailVerified: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
emailVerificationToken: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
},
|
|
33
|
+
emailVerificationExpires: {
|
|
34
|
+
type: Date,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
phoneNumber: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
phoneVerified: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
45
|
+
phoneVerificationToken: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
49
|
+
phoneVerificationExpires: {
|
|
50
|
+
type: Date,
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
nidNumber: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
nidVerified: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
payout: {
|
|
62
|
+
accountNumber: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: false
|
|
65
|
+
},
|
|
66
|
+
method: {
|
|
67
|
+
type: String,
|
|
68
|
+
enum: ['bkash', 'nagad', 'upay', 'rocket', 'bank_transfer'],
|
|
69
|
+
default: 'bkash'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
25
72
|
role: {
|
|
26
73
|
type: String,
|
|
27
74
|
enum: ['user', 'host', 'admin'],
|