jp.db.schemas 1.0.0 → 1.0.2

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.
Files changed (50) hide show
  1. package/dist/index.d.ts +5 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +13 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/schemas/admin.schema.d.ts +16 -0
  6. package/dist/schemas/admin.schema.d.ts.map +1 -0
  7. package/dist/schemas/admin.schema.js +29 -0
  8. package/dist/schemas/admin.schema.js.map +1 -0
  9. package/dist/schemas/complain.schema.d.ts +24 -0
  10. package/dist/schemas/complain.schema.d.ts.map +1 -0
  11. package/dist/schemas/complain.schema.js +61 -0
  12. package/dist/schemas/complain.schema.js.map +1 -0
  13. package/dist/schemas/notification.schema.d.ts +28 -0
  14. package/dist/schemas/notification.schema.d.ts.map +1 -0
  15. package/dist/schemas/notification.schema.js +77 -0
  16. package/dist/schemas/notification.schema.js.map +1 -0
  17. package/dist/schemas/purchase.schema.d.ts.map +1 -1
  18. package/dist/schemas/purchase.schema.js.map +1 -1
  19. package/dist/schemas/scheduled_tournament.schema.d.ts +46 -0
  20. package/dist/schemas/scheduled_tournament.schema.d.ts.map +1 -0
  21. package/dist/schemas/scheduled_tournament.schema.js +101 -0
  22. package/dist/schemas/scheduled_tournament.schema.js.map +1 -0
  23. package/dist/schemas/user.fb.schema.d.ts.map +1 -1
  24. package/dist/schemas/user.fb.schema.js.map +1 -1
  25. package/dist/schemas/user.google.schema.d.ts.map +1 -1
  26. package/dist/schemas/user.google.schema.js.map +1 -1
  27. package/dist/schemas/user.ok.schema.d.ts.map +1 -1
  28. package/dist/schemas/user.ok.schema.js.map +1 -1
  29. package/dist/schemas/user.schema.d.ts.map +1 -1
  30. package/dist/schemas/user.schema.js.map +1 -1
  31. package/dist/schemas/user.tg.schema.d.ts.map +1 -1
  32. package/dist/schemas/user.tg.schema.js.map +1 -1
  33. package/dist/schemas/user.vk.schema.d.ts.map +1 -1
  34. package/dist/schemas/user.vk.schema.js.map +1 -1
  35. package/dist/schemas/user.ya.schema.d.ts.map +1 -1
  36. package/dist/schemas/user.ya.schema.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/index.ts +12 -0
  39. package/src/schemas/admin.schema.ts +15 -0
  40. package/src/schemas/complain.schema.ts +39 -0
  41. package/src/schemas/notification.schema.ts +51 -0
  42. package/src/schemas/purchase.schema.ts +30 -30
  43. package/src/schemas/scheduled_tournament.schema.ts +83 -0
  44. package/src/schemas/user.fb.schema.ts +16 -16
  45. package/src/schemas/user.google.schema.ts +10 -10
  46. package/src/schemas/user.ok.schema.ts +26 -26
  47. package/src/schemas/user.schema.ts +139 -139
  48. package/src/schemas/user.tg.schema.ts +14 -14
  49. package/src/schemas/user.vk.schema.ts +36 -36
  50. package/src/schemas/user.ya.schema.ts +10 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp.db.schemas",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -6,6 +6,10 @@ import { TGUser, TGUserSchema } from './schemas/user.tg.schema';
6
6
  import { VKUser, VKUserSchema } from './schemas/user.vk.schema';
7
7
  import { YAUser, YAUserSchema } from './schemas/user.ya.schema';
8
8
  import { Purchase, PurchaseSchema } from './schemas/purchase.schema';
9
+ import { Complain, ComplainSchema } from './schemas/complain.schema';
10
+ import { Notification, NotificationSchema } from './schemas/notification.schema';
11
+ import { ScheduledTournament, ScheduledTournamentSchema } from './schemas/scheduled_tournament.schema';
12
+ import { Admin, AdminSchema } from './schemas/admin.schema';
9
13
 
10
14
  export {
11
15
  User,
@@ -24,4 +28,12 @@ export {
24
28
  YAUserSchema,
25
29
  Purchase,
26
30
  PurchaseSchema,
31
+ Complain,
32
+ ComplainSchema,
33
+ Notification,
34
+ NotificationSchema,
35
+ ScheduledTournament,
36
+ ScheduledTournamentSchema,
37
+ Admin,
38
+ AdminSchema,
27
39
  }
@@ -0,0 +1,15 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { HydratedDocument } from 'mongoose';
3
+
4
+ export type AdminDocument = HydratedDocument<Admin>;
5
+
6
+ @Schema()
7
+ export class Admin {
8
+ @Prop()
9
+ login: string;
10
+
11
+ @Prop()
12
+ pass: string;
13
+ }
14
+
15
+ export const AdminSchema = SchemaFactory.createForClass(Admin);
@@ -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
- @Prop({ type: SchemaTypes.ObjectId })
9
- productId: Types.ObjectId;
8
+ @Prop({ type: SchemaTypes.ObjectId })
9
+ productId: Types.ObjectId;
10
10
 
11
- @Prop()
12
- title: string;
11
+ @Prop()
12
+ title: string;
13
13
 
14
- @Prop()
15
- amount: number;
14
+ @Prop()
15
+ amount: number;
16
16
 
17
- @Prop()
18
- currency: string;
17
+ @Prop()
18
+ currency: string;
19
19
 
20
- @Prop()
21
- datetime: Date;
20
+ @Prop()
21
+ datetime: Date;
22
22
 
23
- @Prop()
24
- type: string;
23
+ @Prop()
24
+ type: string;
25
25
 
26
- @Prop()
27
- vkOrderId?: number;
26
+ @Prop()
27
+ vkOrderId?: number;
28
28
 
29
- @Prop()
30
- okOrderId?: string;
29
+ @Prop()
30
+ okOrderId?: string;
31
31
 
32
- @Prop()
33
- yaOrderId?: string;
32
+ @Prop()
33
+ yaOrderId?: string;
34
34
 
35
- @Prop()
36
- fbOrderId?: string;
35
+ @Prop()
36
+ fbOrderId?: string;
37
37
 
38
- @Prop()
39
- googlePlayOrderId?: string;
38
+ @Prop()
39
+ googlePlayOrderId?: string;
40
40
 
41
- @Prop()
42
- ruStoreOrderId?: string;
41
+ @Prop()
42
+ ruStoreOrderId?: string;
43
43
 
44
- @Prop()
45
- ticketAmount?: number;
44
+ @Prop()
45
+ ticketAmount?: number;
46
46
 
47
- @Prop()
48
- guid: string;
47
+ @Prop()
48
+ guid: string;
49
49
 
50
- @Prop()
51
- chips?: number;
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
- @Prop()
9
- contextId?: string;
8
+ @Prop()
9
+ contextId?: string;
10
10
 
11
- @Prop()
12
- contextType: string;
11
+ @Prop()
12
+ contextType: string;
13
13
 
14
- @Prop()
15
- locale: string;
14
+ @Prop()
15
+ locale: string;
16
16
 
17
- @Prop()
18
- platform: string;
17
+ @Prop()
18
+ platform: string;
19
19
 
20
- @Prop()
21
- sdkVersion: string;
20
+ @Prop()
21
+ sdkVersion: string;
22
22
 
23
- @Prop()
24
- playerName: string;
23
+ @Prop()
24
+ playerName: string;
25
25
 
26
- @Prop()
27
- playerPic: string;
26
+ @Prop()
27
+ playerPic: string;
28
28
 
29
- @Prop()
30
- playerId: string;
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
- @Prop()
9
- userId: string;
8
+ @Prop()
9
+ userId: string;
10
10
 
11
- @Prop()
12
- fullName: string;
11
+ @Prop()
12
+ fullName: string;
13
13
 
14
- @Prop()
15
- language: string;
14
+ @Prop()
15
+ language: string;
16
16
 
17
- @Prop()
18
- avatarUrl: string;
17
+ @Prop()
18
+ avatarUrl: string;
19
19
 
20
- @Prop()
21
- email: string;
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
- @Prop()
9
- id: number;
8
+ @Prop()
9
+ id: number;
10
10
 
11
- @Prop()
12
- city: String;
11
+ @Prop()
12
+ city: String;
13
13
 
14
- @Prop()
15
- country: String;
14
+ @Prop()
15
+ country: String;
16
16
 
17
- @Prop()
18
- countryCode: String;
17
+ @Prop()
18
+ countryCode: String;
19
19
 
20
- @Prop()
21
- countryName: String;
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
- @Prop()
31
- uid: string;
30
+ @Prop()
31
+ uid: string;
32
32
 
33
- @Prop()
34
- birthday: string;
33
+ @Prop()
34
+ birthday: string;
35
35
 
36
- @Prop()
37
- birthdaySet: boolean;
36
+ @Prop()
37
+ birthdaySet: boolean;
38
38
 
39
- @Prop()
40
- age: number;
39
+ @Prop()
40
+ age: number;
41
41
 
42
- @Prop()
43
- first_name: string;
42
+ @Prop()
43
+ first_name: string;
44
44
 
45
- @Prop()
46
- last_name: string;
45
+ @Prop()
46
+ last_name: string;
47
47
 
48
- @Prop()
49
- location: OKUserLocation;
48
+ @Prop()
49
+ location: OKUserLocation;
50
50
 
51
- @Prop()
52
- pic128x128: string;
51
+ @Prop()
52
+ pic128x128: string;
53
53
  }
54
54
 
55
55
  export const OKUserSchema = SchemaFactory.createForClass(OKUser);