jp.db.schemas 2.0.0 → 2.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 (111) hide show
  1. package/dist/index.d.ts +12 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +17 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/repositories/index.d.ts +5 -1
  6. package/dist/repositories/index.d.ts.map +1 -1
  7. package/dist/repositories/index.js +9 -1
  8. package/dist/repositories/index.js.map +1 -1
  9. package/dist/repositories/simple-rooms.repository.d.ts +8 -0
  10. package/dist/repositories/simple-rooms.repository.d.ts.map +1 -0
  11. package/dist/repositories/simple-rooms.repository.js +36 -0
  12. package/dist/repositories/simple-rooms.repository.js.map +1 -0
  13. package/dist/repositories/tournament-many-tables-rooms.repository.d.ts +8 -0
  14. package/dist/repositories/tournament-many-tables-rooms.repository.d.ts.map +1 -0
  15. package/dist/repositories/tournament-many-tables-rooms.repository.js +36 -0
  16. package/dist/repositories/tournament-many-tables-rooms.repository.js.map +1 -0
  17. package/dist/repositories/tournament-one-table-rooms.repository.d.ts +8 -0
  18. package/dist/repositories/tournament-one-table-rooms.repository.d.ts.map +1 -0
  19. package/dist/repositories/tournament-one-table-rooms.repository.js +36 -0
  20. package/dist/repositories/tournament-one-table-rooms.repository.js.map +1 -0
  21. package/dist/repositories/tournament-result.repository.d.ts +9 -0
  22. package/dist/repositories/tournament-result.repository.d.ts.map +1 -0
  23. package/dist/repositories/tournament-result.repository.js +39 -0
  24. package/dist/repositories/tournament-result.repository.js.map +1 -0
  25. package/dist/schemas/achievement.schema.js +1 -1
  26. package/dist/schemas/achievement.schema.js.map +1 -1
  27. package/dist/schemas/admin.schema.js +1 -1
  28. package/dist/schemas/admin.schema.js.map +1 -1
  29. package/dist/schemas/article.schema.js +1 -1
  30. package/dist/schemas/article.schema.js.map +1 -1
  31. package/dist/schemas/balance_history.schema.js +1 -1
  32. package/dist/schemas/balance_history.schema.js.map +1 -1
  33. package/dist/schemas/banner.schema.js +1 -1
  34. package/dist/schemas/banner.schema.js.map +1 -1
  35. package/dist/schemas/channel_message.schema.js +1 -1
  36. package/dist/schemas/channel_message.schema.js.map +1 -1
  37. package/dist/schemas/complain.schema.js +1 -1
  38. package/dist/schemas/complain.schema.js.map +1 -1
  39. package/dist/schemas/feature.schema.js +1 -1
  40. package/dist/schemas/feature.schema.js.map +1 -1
  41. package/dist/schemas/game_result.schema.js +1 -1
  42. package/dist/schemas/game_result.schema.js.map +1 -1
  43. package/dist/schemas/menu.schema.js +1 -1
  44. package/dist/schemas/menu.schema.js.map +1 -1
  45. package/dist/schemas/notification.schema.js +1 -1
  46. package/dist/schemas/notification.schema.js.map +1 -1
  47. package/dist/schemas/product.schema.js +1 -1
  48. package/dist/schemas/product.schema.js.map +1 -1
  49. package/dist/schemas/purchase.schema.js +1 -1
  50. package/dist/schemas/purchase.schema.js.map +1 -1
  51. package/dist/schemas/purchase_channel.schema.js +1 -1
  52. package/dist/schemas/purchase_channel.schema.js.map +1 -1
  53. package/dist/schemas/rating.schema.js +1 -1
  54. package/dist/schemas/rating.schema.js.map +1 -1
  55. package/dist/schemas/rooms.schema.js +1 -1
  56. package/dist/schemas/rooms.schema.js.map +1 -1
  57. package/dist/schemas/scheduled_tournament.schema.js +1 -1
  58. package/dist/schemas/scheduled_tournament.schema.js.map +1 -1
  59. package/dist/schemas/server.schema.js +1 -1
  60. package/dist/schemas/server.schema.js.map +1 -1
  61. package/dist/schemas/setting.schema.js +1 -1
  62. package/dist/schemas/setting.schema.js.map +1 -1
  63. package/dist/schemas/simple_rooms.schema.d.ts +125 -0
  64. package/dist/schemas/simple_rooms.schema.d.ts.map +1 -0
  65. package/dist/schemas/simple_rooms.schema.js +65 -0
  66. package/dist/schemas/simple_rooms.schema.js.map +1 -0
  67. package/dist/schemas/tournament_many_tables_rooms.schema.d.ts +200 -0
  68. package/dist/schemas/tournament_many_tables_rooms.schema.d.ts.map +1 -0
  69. package/dist/schemas/tournament_many_tables_rooms.schema.js +93 -0
  70. package/dist/schemas/tournament_many_tables_rooms.schema.js.map +1 -0
  71. package/dist/schemas/tournament_one_table_rooms.schema.d.ts +125 -0
  72. package/dist/schemas/tournament_one_table_rooms.schema.d.ts.map +1 -0
  73. package/dist/schemas/tournament_one_table_rooms.schema.js +65 -0
  74. package/dist/schemas/tournament_one_table_rooms.schema.js.map +1 -0
  75. package/dist/schemas/tournament_result.schema.d.ts +82 -0
  76. package/dist/schemas/tournament_result.schema.d.ts.map +1 -0
  77. package/dist/schemas/tournament_result.schema.js +45 -0
  78. package/dist/schemas/tournament_result.schema.js.map +1 -0
  79. package/dist/schemas/user.schema.js +1 -1
  80. package/dist/schemas/user.schema.js.map +1 -1
  81. package/package.json +1 -1
  82. package/src/index.ts +28 -0
  83. package/src/repositories/index.ts +8 -0
  84. package/src/repositories/simple-rooms.repository.ts +17 -0
  85. package/src/repositories/tournament-many-tables-rooms.repository.ts +17 -0
  86. package/src/repositories/tournament-one-table-rooms.repository.ts +17 -0
  87. package/src/repositories/tournament-result.repository.ts +21 -0
  88. package/src/schemas/achievement.schema.ts +1 -1
  89. package/src/schemas/admin.schema.ts +1 -1
  90. package/src/schemas/article.schema.ts +1 -1
  91. package/src/schemas/balance_history.schema.ts +1 -1
  92. package/src/schemas/banner.schema.ts +1 -1
  93. package/src/schemas/channel_message.schema.ts +1 -1
  94. package/src/schemas/complain.schema.ts +1 -1
  95. package/src/schemas/feature.schema.ts +1 -1
  96. package/src/schemas/game_result.schema.ts +1 -1
  97. package/src/schemas/menu.schema.ts +1 -1
  98. package/src/schemas/notification.schema.ts +1 -1
  99. package/src/schemas/product.schema.ts +1 -1
  100. package/src/schemas/purchase.schema.ts +1 -1
  101. package/src/schemas/purchase_channel.schema.ts +1 -1
  102. package/src/schemas/rating.schema.ts +1 -1
  103. package/src/schemas/rooms.schema.ts +1 -1
  104. package/src/schemas/scheduled_tournament.schema.ts +1 -1
  105. package/src/schemas/server.schema.ts +1 -1
  106. package/src/schemas/setting.schema.ts +1 -1
  107. package/src/schemas/simple_rooms.schema.ts +43 -0
  108. package/src/schemas/tournament_many_tables_rooms.schema.ts +70 -0
  109. package/src/schemas/tournament_one_table_rooms.schema.ts +43 -0
  110. package/src/schemas/tournament_result.schema.ts +36 -0
  111. package/src/schemas/user.schema.ts +1 -1
@@ -0,0 +1,125 @@
1
+ import { Document, HydratedDocument } from 'mongoose';
2
+ export type TournamentOneTableRoomDocument = HydratedDocument<TournamentOneTableRoom>;
3
+ export declare class TournamentOneTableRoom {
4
+ readonly roomId: string;
5
+ title: Record<string, string>;
6
+ subtitle: Record<string, string>;
7
+ tableSize: number;
8
+ bet: number;
9
+ ticketPrice: number;
10
+ roomType: string;
11
+ gameType: string;
12
+ rulesType: string;
13
+ deckType?: string;
14
+ }
15
+ export declare const TournamentOneTableRoomSchema: import("mongoose").Schema<TournamentOneTableRoom, import("mongoose").Model<TournamentOneTableRoom, any, any, any, (Document<unknown, any, TournamentOneTableRoom, any, import("mongoose").DefaultSchemaOptions> & TournamentOneTableRoom & {
16
+ _id: import("mongoose").Types.ObjectId;
17
+ } & {
18
+ __v: number;
19
+ } & {
20
+ id: string;
21
+ }) | (Document<unknown, any, TournamentOneTableRoom, any, import("mongoose").DefaultSchemaOptions> & TournamentOneTableRoom & {
22
+ _id: import("mongoose").Types.ObjectId;
23
+ } & {
24
+ __v: number;
25
+ }), any, TournamentOneTableRoom>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
26
+ id: string;
27
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ } & {
30
+ __v: number;
31
+ }, "id"> & {
32
+ id: string;
33
+ }, {
34
+ readonly roomId?: import("mongoose").SchemaDefinitionProperty<string, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
35
+ id: string;
36
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
37
+ _id: import("mongoose").Types.ObjectId;
38
+ } & {
39
+ __v: number;
40
+ }, "id"> & {
41
+ id: string;
42
+ }>;
43
+ title?: import("mongoose").SchemaDefinitionProperty<Record<string, string>, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
44
+ id: string;
45
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
46
+ _id: import("mongoose").Types.ObjectId;
47
+ } & {
48
+ __v: number;
49
+ }, "id"> & {
50
+ id: string;
51
+ }>;
52
+ subtitle?: import("mongoose").SchemaDefinitionProperty<Record<string, string>, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
53
+ id: string;
54
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
55
+ _id: import("mongoose").Types.ObjectId;
56
+ } & {
57
+ __v: number;
58
+ }, "id"> & {
59
+ id: string;
60
+ }>;
61
+ tableSize?: import("mongoose").SchemaDefinitionProperty<number, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
62
+ id: string;
63
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
64
+ _id: import("mongoose").Types.ObjectId;
65
+ } & {
66
+ __v: number;
67
+ }, "id"> & {
68
+ id: string;
69
+ }>;
70
+ bet?: import("mongoose").SchemaDefinitionProperty<number, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
71
+ id: string;
72
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
73
+ _id: import("mongoose").Types.ObjectId;
74
+ } & {
75
+ __v: number;
76
+ }, "id"> & {
77
+ id: string;
78
+ }>;
79
+ ticketPrice?: import("mongoose").SchemaDefinitionProperty<number, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
80
+ id: string;
81
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
82
+ _id: import("mongoose").Types.ObjectId;
83
+ } & {
84
+ __v: number;
85
+ }, "id"> & {
86
+ id: string;
87
+ }>;
88
+ roomType?: import("mongoose").SchemaDefinitionProperty<string, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
89
+ id: string;
90
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
91
+ _id: import("mongoose").Types.ObjectId;
92
+ } & {
93
+ __v: number;
94
+ }, "id"> & {
95
+ id: string;
96
+ }>;
97
+ gameType?: import("mongoose").SchemaDefinitionProperty<string, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
98
+ id: string;
99
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
100
+ _id: import("mongoose").Types.ObjectId;
101
+ } & {
102
+ __v: number;
103
+ }, "id"> & {
104
+ id: string;
105
+ }>;
106
+ rulesType?: import("mongoose").SchemaDefinitionProperty<string, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
107
+ id: string;
108
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
109
+ _id: import("mongoose").Types.ObjectId;
110
+ } & {
111
+ __v: number;
112
+ }, "id"> & {
113
+ id: string;
114
+ }>;
115
+ deckType?: import("mongoose").SchemaDefinitionProperty<string, TournamentOneTableRoom, Document<unknown, {}, TournamentOneTableRoom, {
116
+ id: string;
117
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentOneTableRoom & {
118
+ _id: import("mongoose").Types.ObjectId;
119
+ } & {
120
+ __v: number;
121
+ }, "id"> & {
122
+ id: string;
123
+ }>;
124
+ }, TournamentOneTableRoom>;
125
+ //# sourceMappingURL=tournament_one_table_rooms.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament_one_table_rooms.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/tournament_one_table_rooms.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;AAEtF,qBACa,sBAAsB;IAM/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAGxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAG9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAGjC,SAAS,EAAE,MAAM,CAAC;IAGlB,GAAG,EAAE,MAAM,CAAC;IAGZ,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,QAAQ,EAAE,MAAM,CAAC;IAGjB,SAAS,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAAuD,CAAC"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TournamentOneTableRoomSchema = exports.TournamentOneTableRoom = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ let TournamentOneTableRoom = class TournamentOneTableRoom {
15
+ };
16
+ exports.TournamentOneTableRoom = TournamentOneTableRoom;
17
+ __decorate([
18
+ (0, mongoose_1.Virtual)({
19
+ get: function () {
20
+ return this._id.toString();
21
+ },
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], TournamentOneTableRoom.prototype, "roomId", void 0);
25
+ __decorate([
26
+ (0, mongoose_1.Prop)({ type: Object }),
27
+ __metadata("design:type", Object)
28
+ ], TournamentOneTableRoom.prototype, "title", void 0);
29
+ __decorate([
30
+ (0, mongoose_1.Prop)({ type: Object }),
31
+ __metadata("design:type", Object)
32
+ ], TournamentOneTableRoom.prototype, "subtitle", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)(),
35
+ __metadata("design:type", Number)
36
+ ], TournamentOneTableRoom.prototype, "tableSize", void 0);
37
+ __decorate([
38
+ (0, mongoose_1.Prop)(),
39
+ __metadata("design:type", Number)
40
+ ], TournamentOneTableRoom.prototype, "bet", void 0);
41
+ __decorate([
42
+ (0, mongoose_1.Prop)(),
43
+ __metadata("design:type", Number)
44
+ ], TournamentOneTableRoom.prototype, "ticketPrice", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)(),
47
+ __metadata("design:type", String)
48
+ ], TournamentOneTableRoom.prototype, "roomType", void 0);
49
+ __decorate([
50
+ (0, mongoose_1.Prop)(),
51
+ __metadata("design:type", String)
52
+ ], TournamentOneTableRoom.prototype, "gameType", void 0);
53
+ __decorate([
54
+ (0, mongoose_1.Prop)(),
55
+ __metadata("design:type", String)
56
+ ], TournamentOneTableRoom.prototype, "rulesType", void 0);
57
+ __decorate([
58
+ (0, mongoose_1.Prop)(),
59
+ __metadata("design:type", String)
60
+ ], TournamentOneTableRoom.prototype, "deckType", void 0);
61
+ exports.TournamentOneTableRoom = TournamentOneTableRoom = __decorate([
62
+ (0, mongoose_1.Schema)({ collection: 'tournament_one_table_rooms' })
63
+ ], TournamentOneTableRoom);
64
+ exports.TournamentOneTableRoomSchema = mongoose_1.SchemaFactory.createForClass(TournamentOneTableRoom);
65
+ //# sourceMappingURL=tournament_one_table_rooms.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament_one_table_rooms.schema.js","sourceRoot":"","sources":["../../src/schemas/tournament_one_table_rooms.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAMjE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAkClC,CAAA;AAlCY,wDAAsB;AAMtB;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;KACJ,CAAC;;sDACsB;AAGxB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACO;AAG9B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDACU;AAGjC;IADC,IAAA,eAAI,GAAE;;yDACW;AAGlB;IADC,IAAA,eAAI,GAAE;;mDACK;AAGZ;IADC,IAAA,eAAI,GAAE;;2DACa;AAGpB;IADC,IAAA,eAAI,GAAE;;wDACU;AAGjB;IADC,IAAA,eAAI,GAAE;;wDACU;AAGjB;IADC,IAAA,eAAI,GAAE;;yDACW;AAGlB;IADC,IAAA,eAAI,GAAE;;wDACW;iCAjCT,sBAAsB;IADlC,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,4BAA4B,EAAE,CAAC;GACxC,sBAAsB,CAkClC;AAEY,QAAA,4BAA4B,GAAG,wBAAa,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,82 @@
1
+ import { Document, HydratedDocument } from 'mongoose';
2
+ export type TournamentResultDocument = HydratedDocument<TournamentResult>;
3
+ export interface IWinner {
4
+ userId: string;
5
+ userName: string;
6
+ userAvatarUrl: string;
7
+ profit: number;
8
+ rank: number;
9
+ }
10
+ export declare class TournamentResult {
11
+ readonly resultId: string;
12
+ tournamentId: String;
13
+ gameType: String;
14
+ winners: Array<IWinner>;
15
+ createDate: Date;
16
+ }
17
+ export declare const TournamentResultSchema: import("mongoose").Schema<TournamentResult, import("mongoose").Model<TournamentResult, any, any, any, (Document<unknown, any, TournamentResult, any, import("mongoose").DefaultSchemaOptions> & TournamentResult & {
18
+ _id: import("mongoose").Types.ObjectId;
19
+ } & {
20
+ __v: number;
21
+ } & {
22
+ id: string;
23
+ }) | (Document<unknown, any, TournamentResult, any, import("mongoose").DefaultSchemaOptions> & TournamentResult & {
24
+ _id: import("mongoose").Types.ObjectId;
25
+ } & {
26
+ __v: number;
27
+ }), any, TournamentResult>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, TournamentResult, Document<unknown, {}, TournamentResult, {
28
+ id: string;
29
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentResult & {
30
+ _id: import("mongoose").Types.ObjectId;
31
+ } & {
32
+ __v: number;
33
+ }, "id"> & {
34
+ id: string;
35
+ }, {
36
+ readonly resultId?: import("mongoose").SchemaDefinitionProperty<string, TournamentResult, Document<unknown, {}, TournamentResult, {
37
+ id: string;
38
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentResult & {
39
+ _id: import("mongoose").Types.ObjectId;
40
+ } & {
41
+ __v: number;
42
+ }, "id"> & {
43
+ id: string;
44
+ }>;
45
+ tournamentId?: import("mongoose").SchemaDefinitionProperty<String, TournamentResult, Document<unknown, {}, TournamentResult, {
46
+ id: string;
47
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentResult & {
48
+ _id: import("mongoose").Types.ObjectId;
49
+ } & {
50
+ __v: number;
51
+ }, "id"> & {
52
+ id: string;
53
+ }>;
54
+ gameType?: import("mongoose").SchemaDefinitionProperty<String, TournamentResult, Document<unknown, {}, TournamentResult, {
55
+ id: string;
56
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentResult & {
57
+ _id: import("mongoose").Types.ObjectId;
58
+ } & {
59
+ __v: number;
60
+ }, "id"> & {
61
+ id: string;
62
+ }>;
63
+ winners?: import("mongoose").SchemaDefinitionProperty<IWinner[], TournamentResult, Document<unknown, {}, TournamentResult, {
64
+ id: string;
65
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentResult & {
66
+ _id: import("mongoose").Types.ObjectId;
67
+ } & {
68
+ __v: number;
69
+ }, "id"> & {
70
+ id: string;
71
+ }>;
72
+ createDate?: import("mongoose").SchemaDefinitionProperty<Date, TournamentResult, Document<unknown, {}, TournamentResult, {
73
+ id: string;
74
+ }, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & Omit<TournamentResult & {
75
+ _id: import("mongoose").Types.ObjectId;
76
+ } & {
77
+ __v: number;
78
+ }, "id"> & {
79
+ id: string;
80
+ }>;
81
+ }, TournamentResult>;
82
+ //# sourceMappingURL=tournament_result.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament_result.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/tournament_result.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AAE1E,MAAM,WAAW,OAAO;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,gBAAgB;IAMzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAG1B,YAAY,EAAE,MAAM,CAAC;IAGrB,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAGxB,UAAU,EAAE,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAiD,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TournamentResultSchema = exports.TournamentResult = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ let TournamentResult = class TournamentResult {
15
+ };
16
+ exports.TournamentResult = TournamentResult;
17
+ __decorate([
18
+ (0, mongoose_1.Virtual)({
19
+ get: function () {
20
+ return this._id.toString();
21
+ },
22
+ }),
23
+ __metadata("design:type", String)
24
+ ], TournamentResult.prototype, "resultId", void 0);
25
+ __decorate([
26
+ (0, mongoose_1.Prop)(),
27
+ __metadata("design:type", String)
28
+ ], TournamentResult.prototype, "tournamentId", void 0);
29
+ __decorate([
30
+ (0, mongoose_1.Prop)(),
31
+ __metadata("design:type", String)
32
+ ], TournamentResult.prototype, "gameType", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)(),
35
+ __metadata("design:type", Array)
36
+ ], TournamentResult.prototype, "winners", void 0);
37
+ __decorate([
38
+ (0, mongoose_1.Prop)(),
39
+ __metadata("design:type", Date)
40
+ ], TournamentResult.prototype, "createDate", void 0);
41
+ exports.TournamentResult = TournamentResult = __decorate([
42
+ (0, mongoose_1.Schema)({ collection: 'tournament_results' })
43
+ ], TournamentResult);
44
+ exports.TournamentResultSchema = mongoose_1.SchemaFactory.createForClass(TournamentResult);
45
+ //# sourceMappingURL=tournament_result.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tournament_result.schema.js","sourceRoot":"","sources":["../../src/schemas/tournament_result.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAcjE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAmB5B,CAAA;AAnBY,4CAAgB;AAMhB;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;KACJ,CAAC;;kDACwB;AAG1B;IADC,IAAA,eAAI,GAAE;8BACO,MAAM;sDAAC;AAGrB;IADC,IAAA,eAAI,GAAE;8BACG,MAAM;kDAAC;AAGjB;IADC,IAAA,eAAI,GAAE;8BACE,KAAK;iDAAU;AAGxB;IADC,IAAA,eAAI,GAAE;8BACK,IAAI;oDAAC;2BAlBR,gBAAgB;IAD5B,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;GAChC,gBAAgB,CAmB5B;AAEY,QAAA,sBAAsB,GAAG,wBAAa,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC"}
@@ -23,7 +23,7 @@ exports.User = User;
23
23
  __decorate([
24
24
  (0, mongoose_1.Virtual)({
25
25
  get: function () {
26
- return this._id;
26
+ return this._id.toString();
27
27
  },
28
28
  }),
29
29
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"user.schema.js","sourceRoot":"","sources":["../../src/schemas/user.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAGxE,qDAA0C;AAE1C,qDAA0C;AAC1C,qDAA0C;AAC1C,qDAA0C;AAC1C,6DAAkD;AAClD,qDAA0C;AAoDnC,IAAM,IAAI,GAAV,MAAM,IAAI;CAwHhB,CAAA;AAxHY,oBAAI;AAMJ;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,GAAG,CAAC;QACpB,CAAC;KACJ,CAAC;;oCACsB;AAGxB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACR;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACT;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACP;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACT,IAAI;4CAAC;AAKrB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CACA;AAGtB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4CACC;AAGvB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;;mCACpB;AAGd;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;;sCACjB;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;yCACvB;AAGp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;AAG5B;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;8BACP,KAAK;2CAAoB;AAGxC;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;8BACR,KAAK;0CAAS;AAG5B;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;8BACT,KAAK;yCAAS;eAvHlB,IAAI;IADhB,IAAA,iBAAM,GAAE;GACI,IAAI,CAwHhB;AAEY,QAAA,UAAU,GAAG,wBAAa,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp.db.schemas",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -50,6 +50,14 @@ import { GameResult, GameResultSchema } from './schemas/game_result.schema';
50
50
  import type { GameResultDocument } from './schemas/game_result.schema';
51
51
  import { BalanceHistory, BalanceHistorySchema } from './schemas/balance_history.schema';
52
52
  import type { BalanceHistoryDocument } from './schemas/balance_history.schema';
53
+ import { SimpleRoom, SimpleRoomSchema } from './schemas/simple_rooms.schema';
54
+ import type { SimpleRoomDocument } from './schemas/simple_rooms.schema';
55
+ import { TournamentOneTableRoom, TournamentOneTableRoomSchema, } from './schemas/tournament_one_table_rooms.schema';
56
+ import type { TournamentOneTableRoomDocument } from './schemas/tournament_one_table_rooms.schema';
57
+ import { TournamentManyTablesRoom, TournamentManyTablesRoomSchema } from './schemas/tournament_many_tables_rooms.schema';
58
+ import type { TournamentManyTablesRoomDocument } from './schemas/tournament_many_tables_rooms.schema';
59
+ import { TournamentResult, TournamentResultSchema } from './schemas/tournament_result.schema';
60
+ import type { TournamentResultDocument } from './schemas/tournament_result.schema';
53
61
 
54
62
  import {
55
63
  AdminRepository,
@@ -65,6 +73,10 @@ import {
65
73
  RoomsRepository,
66
74
  GameResultRepository,
67
75
  BalanceHistoryRepository,
76
+ SimpleRoomsRepository,
77
+ TournamentOneTableRoomsRepository,
78
+ TournamentManyTablesRoomsRepository,
79
+ TournamentResultRepository,
68
80
  } from './repositories'
69
81
 
70
82
  export type {
@@ -94,6 +106,10 @@ export type {
94
106
  MenuDocument,
95
107
  GameResultDocument,
96
108
  BalanceHistoryDocument,
109
+ SimpleRoomDocument,
110
+ TournamentOneTableRoomDocument,
111
+ TournamentManyTablesRoomDocument,
112
+ TournamentResultDocument,
97
113
  }
98
114
 
99
115
  export {
@@ -149,6 +165,14 @@ export {
149
165
  GameResultSchema,
150
166
  BalanceHistory,
151
167
  BalanceHistorySchema,
168
+ SimpleRoom,
169
+ SimpleRoomSchema,
170
+ TournamentOneTableRoom,
171
+ TournamentOneTableRoomSchema,
172
+ TournamentManyTablesRoom,
173
+ TournamentManyTablesRoomSchema,
174
+ TournamentResult,
175
+ TournamentResultSchema,
152
176
  }
153
177
 
154
178
  export {
@@ -165,4 +189,8 @@ export {
165
189
  RoomsRepository,
166
190
  GameResultRepository,
167
191
  BalanceHistoryRepository,
192
+ SimpleRoomsRepository,
193
+ TournamentOneTableRoomsRepository,
194
+ TournamentManyTablesRoomsRepository,
195
+ TournamentResultRepository,
168
196
  }
@@ -11,6 +11,10 @@ import { MenuRepository } from './menu.repository';
11
11
  import { RoomsRepository } from './rooms.repository';
12
12
  import { GameResultRepository } from './game-result.repository';
13
13
  import { BalanceHistoryRepository } from './balance-history.repository';
14
+ import { SimpleRoomsRepository } from './simple-rooms.repository';
15
+ import { TournamentOneTableRoomsRepository } from './tournament-one-table-rooms.repository';
16
+ import { TournamentManyTablesRoomsRepository } from './tournament-many-tables-rooms.repository';
17
+ import { TournamentResultRepository } from './tournament-result.repository';
14
18
 
15
19
  export {
16
20
  AdminRepository,
@@ -26,4 +30,8 @@ export {
26
30
  RoomsRepository,
27
31
  GameResultRepository,
28
32
  BalanceHistoryRepository,
33
+ SimpleRoomsRepository,
34
+ TournamentOneTableRoomsRepository,
35
+ TournamentManyTablesRoomsRepository,
36
+ TournamentResultRepository,
29
37
  }
@@ -0,0 +1,17 @@
1
+ import { Injectable } from '@nestjs/common';
2
+ import { InjectModel } from '@nestjs/mongoose';
3
+ import { Model } from 'mongoose';
4
+
5
+ import { SimpleRoom, SimpleRoomDocument } from '../';
6
+
7
+ @Injectable()
8
+ export class SimpleRoomsRepository {
9
+ constructor (@InjectModel(SimpleRoom.name) private roomModel: Model<SimpleRoomDocument>) {
10
+ }
11
+
12
+ async findRooms (gameType: string): Promise<Array<SimpleRoomDocument>> {
13
+ return this.roomModel
14
+ .find({ gameType })
15
+ .exec();
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ import { Injectable } from '@nestjs/common';
2
+ import { InjectModel } from '@nestjs/mongoose';
3
+ import { Model } from 'mongoose';
4
+
5
+ import { TournamentManyTablesRoom, TournamentManyTablesRoomDocument } from '../';
6
+
7
+ @Injectable()
8
+ export class TournamentManyTablesRoomsRepository {
9
+ constructor (@InjectModel(TournamentManyTablesRoom.name) private roomModel: Model<TournamentManyTablesRoomDocument>) {
10
+ }
11
+
12
+ async findRooms (gameType: string): Promise<Array<TournamentManyTablesRoomDocument>> {
13
+ return this.roomModel
14
+ .find({ gameType })
15
+ .exec();
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ import { Injectable } from '@nestjs/common';
2
+ import { InjectModel } from '@nestjs/mongoose';
3
+ import { Model } from 'mongoose';
4
+
5
+ import { TournamentOneTableRoom, TournamentOneTableRoomDocument } from '../';
6
+
7
+ @Injectable()
8
+ export class TournamentOneTableRoomsRepository {
9
+ constructor (@InjectModel(TournamentOneTableRoom.name) private roomModel: Model<TournamentOneTableRoomDocument>) {
10
+ }
11
+
12
+ async findRooms (gameType: string): Promise<Array<TournamentOneTableRoomDocument>> {
13
+ return this.roomModel
14
+ .find({ gameType })
15
+ .exec();
16
+ }
17
+ }
@@ -0,0 +1,21 @@
1
+ import { Injectable } from '@nestjs/common';
2
+ import { InjectModel } from '@nestjs/mongoose';
3
+ import { Model } from 'mongoose';
4
+
5
+ import { TournamentResult, TournamentResultDocument, User } from '../';
6
+
7
+ @Injectable()
8
+ export class TournamentResultRepository {
9
+ constructor (@InjectModel(TournamentResult.name) private resultModel: Model<TournamentResultDocument>) {
10
+ }
11
+
12
+ async findByTournamentId (tournamentId: string): Promise<TournamentResultDocument | null> {
13
+ return this.resultModel
14
+ .findOne({ tournamentId })
15
+ .exec();
16
+ }
17
+
18
+ async createResult (result: Partial<TournamentResult>): Promise<TournamentResult> {
19
+ return this.resultModel.create(result);
20
+ }
21
+ }
@@ -7,7 +7,7 @@ export type AchievementDocument = HydratedDocument<Achievement>;
7
7
  export class Achievement {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly achievementId: string;
@@ -7,7 +7,7 @@ export type AdminDocument = HydratedDocument<Admin>;
7
7
  export class Admin {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly adminId: string;
@@ -7,7 +7,7 @@ export type ArticleDocument = HydratedDocument<Article>;
7
7
  export class Article {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly articleId: string;
@@ -7,7 +7,7 @@ export type BalanceHistoryDocument = HydratedDocument<BalanceHistory>;
7
7
  export class BalanceHistory {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly balanceHistoryId: string;
@@ -7,7 +7,7 @@ export type BannerDocument = HydratedDocument<Banner>;
7
7
  export class Banner {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly bannerId: string;
@@ -7,7 +7,7 @@ export type ChannelMessageDocument = HydratedDocument<ChannelMessage>;
7
7
  export class ChannelMessage {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly channelMessageId: string;
@@ -7,7 +7,7 @@ export type ComplainDocument = HydratedDocument<Complain>;
7
7
  export class Complain {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly complainId: string;
@@ -7,7 +7,7 @@ export type FeatureDocument = HydratedDocument<Feature>;
7
7
  export class Feature {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly featureId: string;
@@ -32,7 +32,7 @@ export interface IGameResultHistoryItem {
32
32
  export class GameResult {
33
33
  @Virtual({
34
34
  get: function (this: Document) {
35
- return this._id;
35
+ return this._id.toString();
36
36
  },
37
37
  })
38
38
  readonly gameResultId: string;
@@ -7,7 +7,7 @@ export type MenuDocument = HydratedDocument<Menu>;
7
7
  export class Menu {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly menuId: string;
@@ -7,7 +7,7 @@ export type NotificationDocument = HydratedDocument<Notification>;
7
7
  export class Notification {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly notificationId: string;
@@ -7,7 +7,7 @@ export type ProductDocument = HydratedDocument<Product>;
7
7
  export class Product {
8
8
  @Virtual({
9
9
  get: function (this: Document) {
10
- return this._id;
10
+ return this._id.toString();
11
11
  },
12
12
  })
13
13
  readonly productId: string;