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.
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/repositories/index.d.ts +5 -1
- package/dist/repositories/index.d.ts.map +1 -1
- package/dist/repositories/index.js +9 -1
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/simple-rooms.repository.d.ts +8 -0
- package/dist/repositories/simple-rooms.repository.d.ts.map +1 -0
- package/dist/repositories/simple-rooms.repository.js +36 -0
- package/dist/repositories/simple-rooms.repository.js.map +1 -0
- package/dist/repositories/tournament-many-tables-rooms.repository.d.ts +8 -0
- package/dist/repositories/tournament-many-tables-rooms.repository.d.ts.map +1 -0
- package/dist/repositories/tournament-many-tables-rooms.repository.js +36 -0
- package/dist/repositories/tournament-many-tables-rooms.repository.js.map +1 -0
- package/dist/repositories/tournament-one-table-rooms.repository.d.ts +8 -0
- package/dist/repositories/tournament-one-table-rooms.repository.d.ts.map +1 -0
- package/dist/repositories/tournament-one-table-rooms.repository.js +36 -0
- package/dist/repositories/tournament-one-table-rooms.repository.js.map +1 -0
- package/dist/repositories/tournament-result.repository.d.ts +9 -0
- package/dist/repositories/tournament-result.repository.d.ts.map +1 -0
- package/dist/repositories/tournament-result.repository.js +39 -0
- package/dist/repositories/tournament-result.repository.js.map +1 -0
- package/dist/schemas/achievement.schema.js +1 -1
- package/dist/schemas/achievement.schema.js.map +1 -1
- package/dist/schemas/admin.schema.js +1 -1
- package/dist/schemas/admin.schema.js.map +1 -1
- package/dist/schemas/article.schema.js +1 -1
- package/dist/schemas/article.schema.js.map +1 -1
- package/dist/schemas/balance_history.schema.js +1 -1
- package/dist/schemas/balance_history.schema.js.map +1 -1
- package/dist/schemas/banner.schema.js +1 -1
- package/dist/schemas/banner.schema.js.map +1 -1
- package/dist/schemas/channel_message.schema.js +1 -1
- package/dist/schemas/channel_message.schema.js.map +1 -1
- package/dist/schemas/complain.schema.js +1 -1
- package/dist/schemas/complain.schema.js.map +1 -1
- package/dist/schemas/feature.schema.js +1 -1
- package/dist/schemas/feature.schema.js.map +1 -1
- package/dist/schemas/game_result.schema.js +1 -1
- package/dist/schemas/game_result.schema.js.map +1 -1
- package/dist/schemas/menu.schema.js +1 -1
- package/dist/schemas/menu.schema.js.map +1 -1
- package/dist/schemas/notification.schema.js +1 -1
- package/dist/schemas/notification.schema.js.map +1 -1
- package/dist/schemas/product.schema.js +1 -1
- package/dist/schemas/product.schema.js.map +1 -1
- package/dist/schemas/purchase.schema.js +1 -1
- package/dist/schemas/purchase.schema.js.map +1 -1
- package/dist/schemas/purchase_channel.schema.js +1 -1
- package/dist/schemas/purchase_channel.schema.js.map +1 -1
- package/dist/schemas/rating.schema.js +1 -1
- package/dist/schemas/rating.schema.js.map +1 -1
- package/dist/schemas/rooms.schema.js +1 -1
- package/dist/schemas/rooms.schema.js.map +1 -1
- package/dist/schemas/scheduled_tournament.schema.js +1 -1
- package/dist/schemas/scheduled_tournament.schema.js.map +1 -1
- package/dist/schemas/server.schema.js +1 -1
- package/dist/schemas/server.schema.js.map +1 -1
- package/dist/schemas/setting.schema.js +1 -1
- package/dist/schemas/setting.schema.js.map +1 -1
- package/dist/schemas/simple_rooms.schema.d.ts +125 -0
- package/dist/schemas/simple_rooms.schema.d.ts.map +1 -0
- package/dist/schemas/simple_rooms.schema.js +65 -0
- package/dist/schemas/simple_rooms.schema.js.map +1 -0
- package/dist/schemas/tournament_many_tables_rooms.schema.d.ts +200 -0
- package/dist/schemas/tournament_many_tables_rooms.schema.d.ts.map +1 -0
- package/dist/schemas/tournament_many_tables_rooms.schema.js +93 -0
- package/dist/schemas/tournament_many_tables_rooms.schema.js.map +1 -0
- package/dist/schemas/tournament_one_table_rooms.schema.d.ts +125 -0
- package/dist/schemas/tournament_one_table_rooms.schema.d.ts.map +1 -0
- package/dist/schemas/tournament_one_table_rooms.schema.js +65 -0
- package/dist/schemas/tournament_one_table_rooms.schema.js.map +1 -0
- package/dist/schemas/tournament_result.schema.d.ts +82 -0
- package/dist/schemas/tournament_result.schema.d.ts.map +1 -0
- package/dist/schemas/tournament_result.schema.js +45 -0
- package/dist/schemas/tournament_result.schema.js.map +1 -0
- package/dist/schemas/user.schema.js +1 -1
- package/dist/schemas/user.schema.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +28 -0
- package/src/repositories/index.ts +8 -0
- package/src/repositories/simple-rooms.repository.ts +17 -0
- package/src/repositories/tournament-many-tables-rooms.repository.ts +17 -0
- package/src/repositories/tournament-one-table-rooms.repository.ts +17 -0
- package/src/repositories/tournament-result.repository.ts +21 -0
- package/src/schemas/achievement.schema.ts +1 -1
- package/src/schemas/admin.schema.ts +1 -1
- package/src/schemas/article.schema.ts +1 -1
- package/src/schemas/balance_history.schema.ts +1 -1
- package/src/schemas/banner.schema.ts +1 -1
- package/src/schemas/channel_message.schema.ts +1 -1
- package/src/schemas/complain.schema.ts +1 -1
- package/src/schemas/feature.schema.ts +1 -1
- package/src/schemas/game_result.schema.ts +1 -1
- package/src/schemas/menu.schema.ts +1 -1
- package/src/schemas/notification.schema.ts +1 -1
- package/src/schemas/product.schema.ts +1 -1
- package/src/schemas/purchase.schema.ts +1 -1
- package/src/schemas/purchase_channel.schema.ts +1 -1
- package/src/schemas/rating.schema.ts +1 -1
- package/src/schemas/rooms.schema.ts +1 -1
- package/src/schemas/scheduled_tournament.schema.ts +1 -1
- package/src/schemas/server.schema.ts +1 -1
- package/src/schemas/setting.schema.ts +1 -1
- package/src/schemas/simple_rooms.schema.ts +43 -0
- package/src/schemas/tournament_many_tables_rooms.schema.ts +70 -0
- package/src/schemas/tournament_one_table_rooms.schema.ts +43 -0
- package/src/schemas/tournament_result.schema.ts +36 -0
- package/src/schemas/user.schema.ts +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type SimpleRoomDocument = HydratedDocument<SimpleRoom>;
|
|
5
|
+
|
|
6
|
+
@Schema({ collection: 'simple_rooms' })
|
|
7
|
+
export class SimpleRoom {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this._id.toString();
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly roomId: string;
|
|
14
|
+
|
|
15
|
+
@Prop({ type: Object })
|
|
16
|
+
title: Record<string, string>;
|
|
17
|
+
|
|
18
|
+
@Prop({ type: Object })
|
|
19
|
+
subtitle: Record<string, string>;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
tableSize: number;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
bet: number;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
ticketPrice: number;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
roomType: string;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
gameType: string;
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
rulesType: string;
|
|
38
|
+
|
|
39
|
+
@Prop()
|
|
40
|
+
deckType?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const SimpleRoomSchema = SchemaFactory.createForClass(SimpleRoom);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type TournamentManyTablesRoomDocument = HydratedDocument<TournamentManyTablesRoom>;
|
|
5
|
+
|
|
6
|
+
export interface IParticipant {
|
|
7
|
+
userId: string;
|
|
8
|
+
userName: string;
|
|
9
|
+
userAvatarUrl: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Schema({ collection: 'tournament_many_tables_rooms' })
|
|
13
|
+
export class TournamentManyTablesRoom {
|
|
14
|
+
@Virtual({
|
|
15
|
+
get: function (this: Document) {
|
|
16
|
+
return this._id.toString();
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
readonly roomId: string;
|
|
20
|
+
|
|
21
|
+
@Prop({ type: Object })
|
|
22
|
+
title: Record<string, string>;
|
|
23
|
+
|
|
24
|
+
@Prop({ type: Object })
|
|
25
|
+
subtitle: Record<string, string>;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
tableSize: number;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
bet: number;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
ticketPrice: number;
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
roomType: string;
|
|
38
|
+
|
|
39
|
+
@Prop()
|
|
40
|
+
gameType: string;
|
|
41
|
+
|
|
42
|
+
@Prop()
|
|
43
|
+
rulesType: string;
|
|
44
|
+
|
|
45
|
+
@Prop()
|
|
46
|
+
deckType?: string;
|
|
47
|
+
|
|
48
|
+
@Prop()
|
|
49
|
+
createDate: Date;
|
|
50
|
+
|
|
51
|
+
@Prop()
|
|
52
|
+
startDate: Date;
|
|
53
|
+
|
|
54
|
+
@Prop({ type: Object })
|
|
55
|
+
description: Record<string, string>;
|
|
56
|
+
|
|
57
|
+
@Prop()
|
|
58
|
+
participants: Array<IParticipant>;
|
|
59
|
+
|
|
60
|
+
@Prop()
|
|
61
|
+
maxParticipants: number;
|
|
62
|
+
|
|
63
|
+
@Prop()
|
|
64
|
+
status: string;
|
|
65
|
+
|
|
66
|
+
@Prop()
|
|
67
|
+
type: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const TournamentManyTablesRoomSchema = SchemaFactory.createForClass(TournamentManyTablesRoom);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type TournamentOneTableRoomDocument = HydratedDocument<TournamentOneTableRoom>;
|
|
5
|
+
|
|
6
|
+
@Schema({ collection: 'tournament_one_table_rooms' })
|
|
7
|
+
export class TournamentOneTableRoom {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this._id.toString();
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly roomId: string;
|
|
14
|
+
|
|
15
|
+
@Prop({ type: Object })
|
|
16
|
+
title: Record<string, string>;
|
|
17
|
+
|
|
18
|
+
@Prop({ type: Object })
|
|
19
|
+
subtitle: Record<string, string>;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
tableSize: number;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
bet: number;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
ticketPrice: number;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
roomType: string;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
gameType: string;
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
rulesType: string;
|
|
38
|
+
|
|
39
|
+
@Prop()
|
|
40
|
+
deckType?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const TournamentOneTableRoomSchema = SchemaFactory.createForClass(TournamentOneTableRoom);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type TournamentResultDocument = HydratedDocument<TournamentResult>;
|
|
5
|
+
|
|
6
|
+
export interface IWinner {
|
|
7
|
+
userId: string;
|
|
8
|
+
userName: string;
|
|
9
|
+
userAvatarUrl: string;
|
|
10
|
+
profit: number;
|
|
11
|
+
rank: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Schema({ collection: 'tournament_results' })
|
|
15
|
+
export class TournamentResult {
|
|
16
|
+
@Virtual({
|
|
17
|
+
get: function (this: Document) {
|
|
18
|
+
return this._id.toString();
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
readonly resultId: string;
|
|
22
|
+
|
|
23
|
+
@Prop()
|
|
24
|
+
tournamentId: String;
|
|
25
|
+
|
|
26
|
+
@Prop()
|
|
27
|
+
gameType: String;
|
|
28
|
+
|
|
29
|
+
@Prop()
|
|
30
|
+
winners: Array<IWinner>;
|
|
31
|
+
|
|
32
|
+
@Prop()
|
|
33
|
+
createDate: Date;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const TournamentResultSchema = SchemaFactory.createForClass(TournamentResult);
|