jp.db.schemas 1.0.0 → 1.0.1
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/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/complain.schema.d.ts +24 -0
- package/dist/schemas/complain.schema.d.ts.map +1 -0
- package/dist/schemas/complain.schema.js +61 -0
- package/dist/schemas/complain.schema.js.map +1 -0
- package/dist/schemas/notification.schema.d.ts +28 -0
- package/dist/schemas/notification.schema.d.ts.map +1 -0
- package/dist/schemas/notification.schema.js +77 -0
- package/dist/schemas/notification.schema.js.map +1 -0
- package/dist/schemas/purchase.schema.d.ts.map +1 -1
- package/dist/schemas/purchase.schema.js.map +1 -1
- package/dist/schemas/scheduled_tournament.schema.d.ts +46 -0
- package/dist/schemas/scheduled_tournament.schema.d.ts.map +1 -0
- package/dist/schemas/scheduled_tournament.schema.js +101 -0
- package/dist/schemas/scheduled_tournament.schema.js.map +1 -0
- package/dist/schemas/user.fb.schema.d.ts.map +1 -1
- package/dist/schemas/user.fb.schema.js.map +1 -1
- package/dist/schemas/user.google.schema.d.ts.map +1 -1
- package/dist/schemas/user.google.schema.js.map +1 -1
- package/dist/schemas/user.ok.schema.d.ts.map +1 -1
- package/dist/schemas/user.ok.schema.js.map +1 -1
- package/dist/schemas/user.schema.d.ts.map +1 -1
- package/dist/schemas/user.schema.js.map +1 -1
- package/dist/schemas/user.tg.schema.d.ts.map +1 -1
- package/dist/schemas/user.tg.schema.js.map +1 -1
- package/dist/schemas/user.vk.schema.d.ts.map +1 -1
- package/dist/schemas/user.vk.schema.js.map +1 -1
- package/dist/schemas/user.ya.schema.d.ts.map +1 -1
- package/dist/schemas/user.ya.schema.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +9 -0
- package/src/schemas/complain.schema.ts +39 -0
- package/src/schemas/notification.schema.ts +51 -0
- package/src/schemas/purchase.schema.ts +30 -30
- package/src/schemas/scheduled_tournament.schema.ts +83 -0
- package/src/schemas/user.fb.schema.ts +16 -16
- package/src/schemas/user.google.schema.ts +10 -10
- package/src/schemas/user.ok.schema.ts +26 -26
- package/src/schemas/user.schema.ts +139 -139
- package/src/schemas/user.tg.schema.ts +14 -14
- package/src/schemas/user.vk.schema.ts +36 -36
- package/src/schemas/user.ya.schema.ts +10 -10
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type ComplainDocument = HydratedDocument<Complain>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class Complain {
|
|
8
|
+
@Prop()
|
|
9
|
+
title: string;
|
|
10
|
+
|
|
11
|
+
@Prop()
|
|
12
|
+
witnessUserId: string;
|
|
13
|
+
|
|
14
|
+
@Prop()
|
|
15
|
+
witnessName: string;
|
|
16
|
+
|
|
17
|
+
@Prop()
|
|
18
|
+
witnessAvatarUrl?: string;
|
|
19
|
+
|
|
20
|
+
@Prop()
|
|
21
|
+
witnessComment: string;
|
|
22
|
+
|
|
23
|
+
@Prop()
|
|
24
|
+
suspectUserId: string;
|
|
25
|
+
|
|
26
|
+
@Prop()
|
|
27
|
+
suspectName: string;
|
|
28
|
+
|
|
29
|
+
@Prop()
|
|
30
|
+
suspectAvatarUrl?: string;
|
|
31
|
+
|
|
32
|
+
@Prop()
|
|
33
|
+
suspectComment: string;
|
|
34
|
+
|
|
35
|
+
@Prop()
|
|
36
|
+
hideMessages: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const ComplainSchema = SchemaFactory.createForClass(Complain);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type NotificationDocument = HydratedDocument<Notification>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class Notification {
|
|
8
|
+
@Prop()
|
|
9
|
+
title: string;
|
|
10
|
+
|
|
11
|
+
@Prop()
|
|
12
|
+
titleEn: string;
|
|
13
|
+
|
|
14
|
+
@Prop()
|
|
15
|
+
description: string;
|
|
16
|
+
|
|
17
|
+
@Prop()
|
|
18
|
+
descriptionEn: string;
|
|
19
|
+
|
|
20
|
+
@Prop()
|
|
21
|
+
createDate: Date;
|
|
22
|
+
|
|
23
|
+
@Prop()
|
|
24
|
+
likeCount: number;
|
|
25
|
+
|
|
26
|
+
@Prop()
|
|
27
|
+
linkVK?: string;
|
|
28
|
+
|
|
29
|
+
@Prop()
|
|
30
|
+
linkOK?: string;
|
|
31
|
+
|
|
32
|
+
@Prop()
|
|
33
|
+
linkYA?: string;
|
|
34
|
+
|
|
35
|
+
@Prop()
|
|
36
|
+
linkWeb?: string;
|
|
37
|
+
|
|
38
|
+
@Prop()
|
|
39
|
+
linkAndroid?: string;
|
|
40
|
+
|
|
41
|
+
@Prop()
|
|
42
|
+
linkTG?: string;
|
|
43
|
+
|
|
44
|
+
@Prop()
|
|
45
|
+
category: string;
|
|
46
|
+
|
|
47
|
+
@Prop()
|
|
48
|
+
channels: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const NotificationSchema = SchemaFactory.createForClass(Notification);
|
|
@@ -5,50 +5,50 @@ export type PurchaseDocument = HydratedDocument<Purchase>;
|
|
|
5
5
|
|
|
6
6
|
@Schema()
|
|
7
7
|
export class Purchase {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@Prop({ type: SchemaTypes.ObjectId })
|
|
9
|
+
productId: Types.ObjectId;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
@Prop()
|
|
12
|
+
title: string;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
@Prop()
|
|
15
|
+
amount: number;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
@Prop()
|
|
18
|
+
currency: string;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
@Prop()
|
|
21
|
+
datetime: Date;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
@Prop()
|
|
24
|
+
type: string;
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
@Prop()
|
|
27
|
+
vkOrderId?: number;
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
@Prop()
|
|
30
|
+
okOrderId?: string;
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
@Prop()
|
|
33
|
+
yaOrderId?: string;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
@Prop()
|
|
36
|
+
fbOrderId?: string;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
@Prop()
|
|
39
|
+
googlePlayOrderId?: string;
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
@Prop()
|
|
42
|
+
ruStoreOrderId?: string;
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
@Prop()
|
|
45
|
+
ticketAmount?: number;
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
@Prop()
|
|
48
|
+
guid: string;
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
@Prop()
|
|
51
|
+
chips?: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export const PurchaseSchema = SchemaFactory.createForClass(Purchase);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type ScheduledTournamentDocument = HydratedDocument<ScheduledTournament>;
|
|
5
|
+
|
|
6
|
+
export interface IScheduledTournamentWinner {
|
|
7
|
+
userId: string;
|
|
8
|
+
userName: string;
|
|
9
|
+
userAvatarUrl: string;
|
|
10
|
+
prize: number;
|
|
11
|
+
rank: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IScheduledTournamentParticipant {
|
|
15
|
+
userId: string;
|
|
16
|
+
userName: string;
|
|
17
|
+
userAvatarUrl: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@Schema()
|
|
21
|
+
export class ScheduledTournament {
|
|
22
|
+
@Prop()
|
|
23
|
+
type: string;
|
|
24
|
+
|
|
25
|
+
@Prop()
|
|
26
|
+
name: string;
|
|
27
|
+
|
|
28
|
+
@Prop()
|
|
29
|
+
nameEn: string;
|
|
30
|
+
|
|
31
|
+
@Prop()
|
|
32
|
+
roomType: string;
|
|
33
|
+
|
|
34
|
+
@Prop()
|
|
35
|
+
tableSize: number;
|
|
36
|
+
|
|
37
|
+
@Prop()
|
|
38
|
+
bet: number;
|
|
39
|
+
|
|
40
|
+
@Prop()
|
|
41
|
+
halfBet: number;
|
|
42
|
+
|
|
43
|
+
@Prop()
|
|
44
|
+
ticketPrice: number;
|
|
45
|
+
|
|
46
|
+
@Prop()
|
|
47
|
+
ticketProductId: string;
|
|
48
|
+
|
|
49
|
+
@Prop()
|
|
50
|
+
date: Date;
|
|
51
|
+
|
|
52
|
+
@Prop()
|
|
53
|
+
prizeRu: string;
|
|
54
|
+
|
|
55
|
+
@Prop()
|
|
56
|
+
prizeEn: string;
|
|
57
|
+
|
|
58
|
+
@Prop()
|
|
59
|
+
participants: Array<IScheduledTournamentParticipant>;
|
|
60
|
+
|
|
61
|
+
@Prop()
|
|
62
|
+
winners: Array<IScheduledTournamentWinner>;
|
|
63
|
+
|
|
64
|
+
@Prop()
|
|
65
|
+
maxParticipants: number;
|
|
66
|
+
|
|
67
|
+
@Prop()
|
|
68
|
+
status: string;
|
|
69
|
+
|
|
70
|
+
@Prop()
|
|
71
|
+
category: string;
|
|
72
|
+
|
|
73
|
+
@Prop()
|
|
74
|
+
invitedPlayers: Array<string>;
|
|
75
|
+
|
|
76
|
+
@Prop()
|
|
77
|
+
ownerId?: string;
|
|
78
|
+
|
|
79
|
+
@Prop()
|
|
80
|
+
schedule: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const ScheduledTournamentSchema = SchemaFactory.createForClass(ScheduledTournament);
|
|
@@ -5,29 +5,29 @@ export type FBUserDocument = HydratedDocument<FBUser>;
|
|
|
5
5
|
|
|
6
6
|
@Schema()
|
|
7
7
|
export class FBUser {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@Prop()
|
|
9
|
+
contextId?: string;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
@Prop()
|
|
12
|
+
contextType: string;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
@Prop()
|
|
15
|
+
locale: string;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
@Prop()
|
|
18
|
+
platform: string;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
@Prop()
|
|
21
|
+
sdkVersion: string;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
@Prop()
|
|
24
|
+
playerName: string;
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
@Prop()
|
|
27
|
+
playerPic: string;
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
@Prop()
|
|
30
|
+
playerId: string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export const FBUserSchema = SchemaFactory.createForClass(FBUser);
|
|
@@ -5,20 +5,20 @@ export type GoogleUserDocument = HydratedDocument<GoogleUser>;
|
|
|
5
5
|
|
|
6
6
|
@Schema()
|
|
7
7
|
export class GoogleUser {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@Prop()
|
|
9
|
+
userId: string;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
@Prop()
|
|
12
|
+
fullName: string;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
@Prop()
|
|
15
|
+
language: string;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
@Prop()
|
|
18
|
+
avatarUrl: string;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
@Prop()
|
|
21
|
+
email: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const GoogleUserSchema = SchemaFactory.createForClass(GoogleUser);
|
|
@@ -5,20 +5,20 @@ export type OKUserLocationDocument = HydratedDocument<OKUserLocation>;
|
|
|
5
5
|
|
|
6
6
|
@Schema()
|
|
7
7
|
export class OKUserLocation {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
@Prop()
|
|
9
|
+
id: number;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
@Prop()
|
|
12
|
+
city: String;
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
@Prop()
|
|
15
|
+
country: String;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
@Prop()
|
|
18
|
+
countryCode: String;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
@Prop()
|
|
21
|
+
countryName: String;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const OKUserLocationSchema = SchemaFactory.createForClass(OKUserLocation);
|
|
@@ -27,29 +27,29 @@ export type OKUserDocument = HydratedDocument<OKUser>;
|
|
|
27
27
|
|
|
28
28
|
@Schema()
|
|
29
29
|
export class OKUser {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
@Prop()
|
|
31
|
+
uid: string;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
@Prop()
|
|
34
|
+
birthday: string;
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
@Prop()
|
|
37
|
+
birthdaySet: boolean;
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
@Prop()
|
|
40
|
+
age: number;
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
@Prop()
|
|
43
|
+
first_name: string;
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
@Prop()
|
|
46
|
+
last_name: string;
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
@Prop()
|
|
49
|
+
location: OKUserLocation;
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
@Prop()
|
|
52
|
+
pic128x128: string;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export const OKUserSchema = SchemaFactory.createForClass(OKUser);
|