jp.db.schemas 2.2.10 → 2.2.12
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 +8 -8
- package/dist/index.js +9 -9
- package/dist/repositories/index.d.ts +3 -3
- package/dist/repositories/index.js +5 -5
- package/dist/repositories/many-tables-tournament-rooms.repository.d.ts +21 -0
- package/dist/repositories/many-tables-tournament-rooms.repository.d.ts.map +1 -0
- package/dist/repositories/{tournament-many-tables-rooms.repository.js → many-tables-tournament-rooms.repository.js} +8 -8
- package/dist/repositories/many-tables-tournament-rooms.repository.js.map +1 -0
- package/dist/repositories/one-table-tournament-rooms.repository.d.ts +18 -0
- package/dist/repositories/{tournament-one-table-rooms.repository.d.ts.map → one-table-tournament-rooms.repository.d.ts.map} +1 -1
- package/dist/repositories/{tournament-one-table-rooms.repository.js → one-table-tournament-rooms.repository.js} +8 -8
- package/dist/repositories/{tournament-one-table-rooms.repository.js.map → one-table-tournament-rooms.repository.js.map} +1 -1
- package/dist/schemas/{tournament_many_tables_rooms.schema.d.ts → many_tables_tournament_rooms.schema.d.ts} +52 -52
- package/dist/schemas/{tournament_many_tables_rooms.schema.d.ts.map → many_tables_tournament_rooms.schema.d.ts.map} +1 -1
- package/dist/schemas/{tournament_many_tables_rooms.schema.js → many_tables_tournament_rooms.schema.js} +29 -29
- package/dist/schemas/{tournament_many_tables_rooms.schema.js.map → many_tables_tournament_rooms.schema.js.map} +1 -1
- package/dist/schemas/{tournament_one_table_rooms.schema.d.ts → one_table_tournament_rooms.schema.d.ts} +50 -50
- package/dist/schemas/{tournament_one_table_rooms.schema.d.ts.map → one_table_tournament_rooms.schema.d.ts.map} +1 -1
- package/dist/schemas/{tournament_one_table_rooms.schema.js → one_table_tournament_rooms.schema.js} +28 -28
- package/dist/schemas/{tournament_one_table_rooms.schema.js.map → one_table_tournament_rooms.schema.js.map} +1 -1
- package/dist/schemas/premium.schema.js.map +1 -1
- package/dist/schemas/product.schema.js.map +1 -1
- package/dist/schemas/rule.schema.js.map +1 -1
- package/dist/schemas/setting.schema.js.map +1 -1
- package/dist/schemas/settings_option.schema.js.map +1 -1
- package/dist/schemas/welcome.schema.js.map +1 -1
- package/package.json +37 -37
- package/readme.md +3 -3
- package/src/index.ts +294 -294
- package/src/models/account-type.enum.ts +8 -8
- package/src/models/activity-log-user-login.interface.ts +10 -10
- package/src/models/activity-log.enum.ts +8 -8
- package/src/models/currency.enum.ts +6 -6
- package/src/models/rating-add-bulk-item.interface.ts +7 -7
- package/src/models/rating-monthly-result.interface.ts +11 -11
- package/src/models/tournament-participant.interface.ts +5 -5
- package/src/models/tournament-status.enum.ts +6 -6
- package/src/models/tournament-template.enum.ts +3 -3
- package/src/models/tournament-winner.interface.ts +7 -7
- package/src/models/users-balance-reason.enum.ts +8 -8
- package/src/repositories/achievement.repository.ts +17 -17
- package/src/repositories/activity-log.repository.ts +209 -209
- package/src/repositories/admin.repository.ts +20 -20
- package/src/repositories/article.repository.ts +24 -24
- package/src/repositories/banners.repository.ts +60 -60
- package/src/repositories/complains.repository.ts +31 -31
- package/src/repositories/daily-bonus.repository.ts +32 -32
- package/src/repositories/friend.repository.ts +24 -24
- package/src/repositories/game-result.repository.ts +19 -19
- package/src/repositories/game-statistic.repository.ts +25 -25
- package/src/repositories/index.ts +61 -61
- package/src/repositories/{tournament-many-tables-rooms.repository.ts → many-tables-tournament-rooms.repository.ts} +167 -171
- package/src/repositories/menu.repository.ts +19 -19
- package/src/repositories/notification.repository.ts +59 -59
- package/src/repositories/{tournament-one-table-rooms.repository.ts → one-table-tournament-rooms.repository.ts} +142 -142
- package/src/repositories/premium.repository.ts +16 -16
- package/src/repositories/products.repository.ts +30 -30
- package/src/repositories/purchase.repository.ts +111 -111
- package/src/repositories/rating.repository.ts +90 -90
- package/src/repositories/rooms.repository.ts +14 -14
- package/src/repositories/rule.repository.ts +14 -14
- package/src/repositories/scheduled-tournaments.repository.ts +35 -35
- package/src/repositories/servers.repository.ts +16 -16
- package/src/repositories/setting.repository.ts +24 -24
- package/src/repositories/settings-options.repository.ts +17 -17
- package/src/repositories/simple-rooms.repository.ts +16 -16
- package/src/repositories/users-achievements.repository.ts +46 -46
- package/src/repositories/users-balances.repository.ts +65 -65
- package/src/repositories/users.repository.ts +153 -153
- package/src/repositories/welcome.repository.ts +16 -16
- package/src/schemas/achievement.schema.ts +40 -40
- package/src/schemas/activity_log.schema.ts +37 -37
- package/src/schemas/admin.schema.ts +22 -22
- package/src/schemas/article.schema.ts +37 -37
- package/src/schemas/banner.schema.ts +40 -40
- package/src/schemas/channel_message.schema.ts +32 -32
- package/src/schemas/complain.schema.ts +46 -46
- package/src/schemas/daily_bonus.schema.ts +49 -49
- package/src/schemas/feature.schema.ts +28 -28
- package/src/schemas/friend.schema.ts +49 -49
- package/src/schemas/game_result.schema.ts +68 -68
- package/src/schemas/game_statistic.schema.ts +40 -40
- package/src/schemas/{tournament_many_tables_rooms.schema.ts → many_tables_tournament_rooms.schema.ts} +87 -87
- package/src/schemas/menu.schema.ts +37 -37
- package/src/schemas/notification.schema.ts +61 -61
- package/src/schemas/{tournament_one_table_rooms.schema.ts → one_table_tournament_rooms.schema.ts} +84 -84
- package/src/schemas/premium.schema.ts +37 -37
- package/src/schemas/product.schema.ts +111 -111
- package/src/schemas/purchase.schema.ts +61 -61
- package/src/schemas/purchase_channel.schema.ts +32 -32
- package/src/schemas/rating.schema.ts +37 -37
- package/src/schemas/rooms.schema.ts +63 -63
- package/src/schemas/rule.schema.ts +37 -37
- package/src/schemas/scheduled_tournament.schema.ts +94 -94
- package/src/schemas/server.schema.ts +22 -22
- package/src/schemas/setting.schema.ts +49 -49
- package/src/schemas/settings_option.schema.ts +41 -41
- package/src/schemas/simple_rooms.schema.ts +49 -49
- package/src/schemas/user.fb.schema.ts +33 -33
- package/src/schemas/user.google.schema.ts +24 -24
- package/src/schemas/user.ok.schema.ts +53 -53
- package/src/schemas/user.schema.ts +160 -160
- package/src/schemas/user.tg.schema.ts +30 -30
- package/src/schemas/user.vk.schema.ts +70 -70
- package/src/schemas/user.ya.schema.ts +24 -24
- package/src/schemas/users_achievement.schema.ts +41 -41
- package/src/schemas/users_balance.schema.ts +34 -34
- package/src/schemas/welcome.schema.ts +37 -37
- package/src/utils.ts +3 -3
- package/dist/repositories/tournament-many-tables-rooms.repository.d.ts +0 -21
- package/dist/repositories/tournament-many-tables-rooms.repository.d.ts.map +0 -1
- package/dist/repositories/tournament-many-tables-rooms.repository.js.map +0 -1
- package/dist/repositories/tournament-one-table-rooms.repository.d.ts +0 -18
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
-
import { HydratedDocument } from 'mongoose';
|
|
3
|
-
|
|
4
|
-
export type TGUserDocument = HydratedDocument<TGUser>;
|
|
5
|
-
|
|
6
|
-
@Schema()
|
|
7
|
-
export class TGUser {
|
|
8
|
-
@Prop()
|
|
9
|
-
id: number;
|
|
10
|
-
|
|
11
|
-
@Prop()
|
|
12
|
-
firstName: string;
|
|
13
|
-
|
|
14
|
-
@Prop()
|
|
15
|
-
lastName?: string;
|
|
16
|
-
|
|
17
|
-
@Prop()
|
|
18
|
-
username?: string;
|
|
19
|
-
|
|
20
|
-
@Prop()
|
|
21
|
-
languageCode?: string;
|
|
22
|
-
|
|
23
|
-
@Prop()
|
|
24
|
-
photoUrl?: string;
|
|
25
|
-
|
|
26
|
-
@Prop()
|
|
27
|
-
allowsWriteToPm?: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const TGUserSchema = SchemaFactory.createForClass(TGUser);
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type TGUserDocument = HydratedDocument<TGUser>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class TGUser {
|
|
8
|
+
@Prop()
|
|
9
|
+
id: number;
|
|
10
|
+
|
|
11
|
+
@Prop()
|
|
12
|
+
firstName: string;
|
|
13
|
+
|
|
14
|
+
@Prop()
|
|
15
|
+
lastName?: string;
|
|
16
|
+
|
|
17
|
+
@Prop()
|
|
18
|
+
username?: string;
|
|
19
|
+
|
|
20
|
+
@Prop()
|
|
21
|
+
languageCode?: string;
|
|
22
|
+
|
|
23
|
+
@Prop()
|
|
24
|
+
photoUrl?: string;
|
|
25
|
+
|
|
26
|
+
@Prop()
|
|
27
|
+
allowsWriteToPm?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const TGUserSchema = SchemaFactory.createForClass(TGUser);
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
-
import { HydratedDocument } from 'mongoose';
|
|
3
|
-
|
|
4
|
-
export type VKUserCityDocument = HydratedDocument<VKUserCity>;
|
|
5
|
-
|
|
6
|
-
@Schema()
|
|
7
|
-
export class VKUserCity {
|
|
8
|
-
@Prop()
|
|
9
|
-
id: number;
|
|
10
|
-
|
|
11
|
-
@Prop()
|
|
12
|
-
title: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const VKUserCitySchema = SchemaFactory.createForClass(VKUserCity);
|
|
16
|
-
|
|
17
|
-
export type VKUserDocument = HydratedDocument<VKUser>;
|
|
18
|
-
|
|
19
|
-
@Schema()
|
|
20
|
-
export class VKUser {
|
|
21
|
-
@Prop()
|
|
22
|
-
id: number;
|
|
23
|
-
|
|
24
|
-
@Prop()
|
|
25
|
-
first_name: string;
|
|
26
|
-
|
|
27
|
-
@Prop()
|
|
28
|
-
last_name: string;
|
|
29
|
-
|
|
30
|
-
@Prop()
|
|
31
|
-
sex: number;
|
|
32
|
-
|
|
33
|
-
@Prop()
|
|
34
|
-
bdate: string;
|
|
35
|
-
|
|
36
|
-
@Prop()
|
|
37
|
-
city: VKUserCity;
|
|
38
|
-
|
|
39
|
-
@Prop()
|
|
40
|
-
country: VKUserCity;
|
|
41
|
-
|
|
42
|
-
@Prop()
|
|
43
|
-
photo_100: string;
|
|
44
|
-
|
|
45
|
-
@Prop()
|
|
46
|
-
photo_200: string;
|
|
47
|
-
|
|
48
|
-
@Prop()
|
|
49
|
-
photo_max_orig: string;
|
|
50
|
-
|
|
51
|
-
@Prop()
|
|
52
|
-
timezone: number;
|
|
53
|
-
|
|
54
|
-
@Prop()
|
|
55
|
-
is_closed: boolean;
|
|
56
|
-
|
|
57
|
-
@Prop()
|
|
58
|
-
can_access_closed: boolean;
|
|
59
|
-
|
|
60
|
-
@Prop()
|
|
61
|
-
can_invite_to_chats: boolean;
|
|
62
|
-
|
|
63
|
-
@Prop()
|
|
64
|
-
is_app_ios: boolean;
|
|
65
|
-
|
|
66
|
-
@Prop()
|
|
67
|
-
is_vk_user_id?: boolean;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export const VKUserSchema = SchemaFactory.createForClass(VKUser);
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type VKUserCityDocument = HydratedDocument<VKUserCity>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class VKUserCity {
|
|
8
|
+
@Prop()
|
|
9
|
+
id: number;
|
|
10
|
+
|
|
11
|
+
@Prop()
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const VKUserCitySchema = SchemaFactory.createForClass(VKUserCity);
|
|
16
|
+
|
|
17
|
+
export type VKUserDocument = HydratedDocument<VKUser>;
|
|
18
|
+
|
|
19
|
+
@Schema()
|
|
20
|
+
export class VKUser {
|
|
21
|
+
@Prop()
|
|
22
|
+
id: number;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
first_name: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
last_name: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
sex: number;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
bdate: string;
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
city: VKUserCity;
|
|
38
|
+
|
|
39
|
+
@Prop()
|
|
40
|
+
country: VKUserCity;
|
|
41
|
+
|
|
42
|
+
@Prop()
|
|
43
|
+
photo_100: string;
|
|
44
|
+
|
|
45
|
+
@Prop()
|
|
46
|
+
photo_200: string;
|
|
47
|
+
|
|
48
|
+
@Prop()
|
|
49
|
+
photo_max_orig: string;
|
|
50
|
+
|
|
51
|
+
@Prop()
|
|
52
|
+
timezone: number;
|
|
53
|
+
|
|
54
|
+
@Prop()
|
|
55
|
+
is_closed: boolean;
|
|
56
|
+
|
|
57
|
+
@Prop()
|
|
58
|
+
can_access_closed: boolean;
|
|
59
|
+
|
|
60
|
+
@Prop()
|
|
61
|
+
can_invite_to_chats: boolean;
|
|
62
|
+
|
|
63
|
+
@Prop()
|
|
64
|
+
is_app_ios: boolean;
|
|
65
|
+
|
|
66
|
+
@Prop()
|
|
67
|
+
is_vk_user_id?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const VKUserSchema = SchemaFactory.createForClass(VKUser);
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
-
import { HydratedDocument } from 'mongoose';
|
|
3
|
-
|
|
4
|
-
export type YAUserDocument = HydratedDocument<YAUser>;
|
|
5
|
-
|
|
6
|
-
@Schema()
|
|
7
|
-
export class YAUser {
|
|
8
|
-
@Prop()
|
|
9
|
-
userId: string;
|
|
10
|
-
|
|
11
|
-
@Prop()
|
|
12
|
-
fullName: string;
|
|
13
|
-
|
|
14
|
-
@Prop()
|
|
15
|
-
language: string;
|
|
16
|
-
|
|
17
|
-
@Prop()
|
|
18
|
-
avatarUrl: string;
|
|
19
|
-
|
|
20
|
-
@Prop()
|
|
21
|
-
isGuest: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const YAUserSchema = SchemaFactory.createForClass(YAUser);
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type YAUserDocument = HydratedDocument<YAUser>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class YAUser {
|
|
8
|
+
@Prop()
|
|
9
|
+
userId: string;
|
|
10
|
+
|
|
11
|
+
@Prop()
|
|
12
|
+
fullName: string;
|
|
13
|
+
|
|
14
|
+
@Prop()
|
|
15
|
+
language: string;
|
|
16
|
+
|
|
17
|
+
@Prop()
|
|
18
|
+
avatarUrl: string;
|
|
19
|
+
|
|
20
|
+
@Prop()
|
|
21
|
+
isGuest: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const YAUserSchema = SchemaFactory.createForClass(YAUser);
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
-
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
-
|
|
4
|
-
export type UsersAchievementDocument = HydratedDocument<UsersAchievement>;
|
|
5
|
-
|
|
6
|
-
@Schema({ collection: 'users_achievements' })
|
|
7
|
-
export class UsersAchievement {
|
|
8
|
-
@Virtual({
|
|
9
|
-
get: function (this: Document) {
|
|
10
|
-
return this._id.toString();
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
readonly usersAchievementId: string;
|
|
14
|
-
|
|
15
|
-
@Prop({ default: new Date() })
|
|
16
|
-
date: Date;
|
|
17
|
-
|
|
18
|
-
@Prop()
|
|
19
|
-
userId: string;
|
|
20
|
-
|
|
21
|
-
@Prop()
|
|
22
|
-
userName: string;
|
|
23
|
-
|
|
24
|
-
@Prop()
|
|
25
|
-
achievementId: string;
|
|
26
|
-
|
|
27
|
-
@Prop()
|
|
28
|
-
achievementTitle: string;
|
|
29
|
-
|
|
30
|
-
@Prop()
|
|
31
|
-
achievementCode: string;
|
|
32
|
-
|
|
33
|
-
@Prop()
|
|
34
|
-
achievementPrize: number;
|
|
35
|
-
|
|
36
|
-
@Prop()
|
|
37
|
-
game: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const UsersAchievementSchema =
|
|
41
|
-
SchemaFactory.createForClass(UsersAchievement);
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type UsersAchievementDocument = HydratedDocument<UsersAchievement>;
|
|
5
|
+
|
|
6
|
+
@Schema({ collection: 'users_achievements' })
|
|
7
|
+
export class UsersAchievement {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this._id.toString();
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly usersAchievementId: string;
|
|
14
|
+
|
|
15
|
+
@Prop({ default: new Date() })
|
|
16
|
+
date: Date;
|
|
17
|
+
|
|
18
|
+
@Prop()
|
|
19
|
+
userId: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
userName: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
achievementId: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
achievementTitle: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
achievementCode: string;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
achievementPrize: number;
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
game: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const UsersAchievementSchema =
|
|
41
|
+
SchemaFactory.createForClass(UsersAchievement);
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
-
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
-
|
|
4
|
-
export type UsersBalanceDocument = HydratedDocument<UsersBalance>;
|
|
5
|
-
|
|
6
|
-
@Schema({ collection: 'users_balances' })
|
|
7
|
-
export class UsersBalance {
|
|
8
|
-
@Virtual({
|
|
9
|
-
get: function (this: Document) {
|
|
10
|
-
return this._id.toString();
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
readonly usersBalanceId: string;
|
|
14
|
-
|
|
15
|
-
@Prop({ default: new Date() })
|
|
16
|
-
date: Date;
|
|
17
|
-
|
|
18
|
-
@Prop()
|
|
19
|
-
userId: string;
|
|
20
|
-
|
|
21
|
-
@Prop()
|
|
22
|
-
userName: string;
|
|
23
|
-
|
|
24
|
-
@Prop()
|
|
25
|
-
amount: number;
|
|
26
|
-
|
|
27
|
-
@Prop()
|
|
28
|
-
reason: string;
|
|
29
|
-
|
|
30
|
-
@Prop()
|
|
31
|
-
game: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const UsersBalanceSchema = SchemaFactory.createForClass(UsersBalance);
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type UsersBalanceDocument = HydratedDocument<UsersBalance>;
|
|
5
|
+
|
|
6
|
+
@Schema({ collection: 'users_balances' })
|
|
7
|
+
export class UsersBalance {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this._id.toString();
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly usersBalanceId: string;
|
|
14
|
+
|
|
15
|
+
@Prop({ default: new Date() })
|
|
16
|
+
date: Date;
|
|
17
|
+
|
|
18
|
+
@Prop()
|
|
19
|
+
userId: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
userName: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
amount: number;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
reason: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
game: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const UsersBalanceSchema = SchemaFactory.createForClass(UsersBalance);
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
-
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
-
|
|
4
|
-
export type WelcomeDocument = HydratedDocument<Welcome>;
|
|
5
|
-
|
|
6
|
-
@Schema({ collection: 'welcoms' })
|
|
7
|
-
export class Welcome {
|
|
8
|
-
@Virtual({
|
|
9
|
-
get: function (this: Document) {
|
|
10
|
-
return this._id.toString();
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
readonly ruleId: string;
|
|
14
|
-
|
|
15
|
-
@Prop()
|
|
16
|
-
id: string;
|
|
17
|
-
|
|
18
|
-
@Prop({type: Object})
|
|
19
|
-
description: Record<string, string>;
|
|
20
|
-
|
|
21
|
-
@Prop({type: Object})
|
|
22
|
-
text: Record<string, string>;
|
|
23
|
-
|
|
24
|
-
@Prop()
|
|
25
|
-
icon: string;
|
|
26
|
-
|
|
27
|
-
@Prop()
|
|
28
|
-
url: string;
|
|
29
|
-
|
|
30
|
-
@Prop()
|
|
31
|
-
game: string;
|
|
32
|
-
|
|
33
|
-
@Prop()
|
|
34
|
-
channel: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const WelcomeSchema = SchemaFactory.createForClass(Welcome);
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type WelcomeDocument = HydratedDocument<Welcome>;
|
|
5
|
+
|
|
6
|
+
@Schema({ collection: 'welcoms' })
|
|
7
|
+
export class Welcome {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this._id.toString();
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly ruleId: string;
|
|
14
|
+
|
|
15
|
+
@Prop()
|
|
16
|
+
id: string;
|
|
17
|
+
|
|
18
|
+
@Prop({ type: Object })
|
|
19
|
+
description: Record<string, string>;
|
|
20
|
+
|
|
21
|
+
@Prop({ type: Object })
|
|
22
|
+
text: Record<string, string>;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
icon: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
url: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
game: string;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
channel: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const WelcomeSchema = SchemaFactory.createForClass(Welcome);
|
package/src/utils.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export function getChannelRegExpFilter(channel: string) {
|
|
2
|
-
return new RegExp(`ALL|${channel}`, 'i');
|
|
3
|
-
}
|
|
1
|
+
export function getChannelRegExpFilter(channel: string) {
|
|
2
|
+
return new RegExp(`ALL|${channel}`, 'i');
|
|
3
|
+
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Model } from 'mongoose';
|
|
2
|
-
import { TournamentManyTablesRoom, TournamentManyTablesRoomDocument, TournamentOneTableRoomDocument } from '../';
|
|
3
|
-
import { ITournamentWinner } from '../models/tournament-winner.interface';
|
|
4
|
-
import { ITournamentParticipant } from '../models/tournament-participant.interface';
|
|
5
|
-
export declare class TournamentManyTablesRoomsRepository {
|
|
6
|
-
private tournamentModel;
|
|
7
|
-
constructor(tournamentModel: Model<TournamentManyTablesRoomDocument>);
|
|
8
|
-
findTournamentById(tournamentId: string): Promise<TournamentManyTablesRoomDocument | null>;
|
|
9
|
-
findTemplateById(templateId: string, gameType: string): Promise<TournamentOneTableRoomDocument | null>;
|
|
10
|
-
findActualTournaments(gameType: string): Promise<Array<TournamentManyTablesRoomDocument>>;
|
|
11
|
-
findWaitingTournamentByDate(gameType: string, startDate: Date, endDate: Date): Promise<TournamentOneTableRoomDocument | null>;
|
|
12
|
-
createTournament(tournament: Partial<TournamentManyTablesRoom>): Promise<TournamentManyTablesRoomDocument>;
|
|
13
|
-
scheduleTournamentFromMasterTemplate(gameType: string, scheduleDate: Date): Promise<TournamentManyTablesRoomDocument>;
|
|
14
|
-
updateTournament(tournamentId: string, tournament: Partial<TournamentManyTablesRoom>): Promise<TournamentManyTablesRoomDocument>;
|
|
15
|
-
removeTournament(tournamentId: string): Promise<void>;
|
|
16
|
-
startTournament(tournamentId: string): Promise<void>;
|
|
17
|
-
cancelTournament(tournamentId: string): Promise<void>;
|
|
18
|
-
finishTournament(tournamentId: string, winners: Array<ITournamentWinner>): Promise<void>;
|
|
19
|
-
addPlayerToParticipants(tournamentId: string, player: ITournamentParticipant): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=tournament-many-tables-rooms.repository.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-many-tables-rooms.repository.d.ts","sourceRoot":"","sources":["../../src/repositories/tournament-many-tables-rooms.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,8BAA8B,EAC/B,MAAM,KAAK,CAAC;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEpF,qBACa,mCAAmC;IAG5C,OAAO,CAAC,eAAe;gBAAf,eAAe,EAAE,KAAK,CAAC,gCAAgC,CAAC;IAG5D,kBAAkB,CACtB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,gCAAgC,GAAG,IAAI,CAAC;IAI7C,gBAAgB,CACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC;IAI3C,qBAAqB,CACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAmB7C,2BAA2B,CAC/B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,IAAI,GACZ,OAAO,CAAC,8BAA8B,GAAG,IAAI,CAAC;IAW3C,gBAAgB,CACpB,UAAU,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAC5C,OAAO,CAAC,gCAAgC,CAAC;IAItC,oCAAoC,CACxC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,IAAI,GACjB,OAAO,CAAC,gCAAgC,CAAC;IA4BtC,gBAAgB,CACpB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAC5C,OAAO,CAAC,gCAAgC,CAAC;IAUtC,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrD,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWpD,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWrD,gBAAgB,CACpB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC;IAYV,uBAAuB,CAC3B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,IAAI,CAAC;CAKjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-many-tables-rooms.repository.js","sourceRoot":"","sources":["../../src/repositories/tournament-many-tables-rooms.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;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A0J/C"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Model } from 'mongoose';
|
|
2
|
-
import { TournamentOneTableRoom, TournamentOneTableRoomDocument } from '../';
|
|
3
|
-
import { ITournamentParticipant } from '../models/tournament-participant.interface';
|
|
4
|
-
import { ITournamentWinner } from '../models/tournament-winner.interface';
|
|
5
|
-
export declare class TournamentOneTableRoomsRepository {
|
|
6
|
-
private tournamentModel;
|
|
7
|
-
constructor(tournamentModel: Model<TournamentOneTableRoomDocument>);
|
|
8
|
-
findTournamentById(tournamentId: string): Promise<TournamentOneTableRoomDocument | null>;
|
|
9
|
-
findTemplateById(templateId: string, gameType: string): Promise<TournamentOneTableRoomDocument | null>;
|
|
10
|
-
findActualTournaments(gameType: string): Promise<Array<TournamentOneTableRoomDocument>>;
|
|
11
|
-
findWaitingTournament(gameType: string): Promise<TournamentOneTableRoomDocument | null>;
|
|
12
|
-
createTournament(tournament: Partial<TournamentOneTableRoom>): Promise<TournamentOneTableRoomDocument>;
|
|
13
|
-
createTournamentFromMasterTemplate(gameType: string): Promise<TournamentOneTableRoomDocument>;
|
|
14
|
-
startTournament(tournamentId: string, participants: Array<ITournamentParticipant>): Promise<void>;
|
|
15
|
-
cancelTournament(tournamentId: string): Promise<void>;
|
|
16
|
-
finishTournament(tournamentId: string, winners: Array<ITournamentWinner>): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=tournament-one-table-rooms.repository.d.ts.map
|