jp.ms.common.modules 1.0.41 → 1.0.43
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/dto/app-table/card.dto.d.ts +1 -0
- package/dist/dto/app-table/card.dto.js +11 -0
- package/dist/dto/app-table/card.dto.js.map +1 -1
- package/dist/dto/app-table/player.dto.d.ts +1 -0
- package/dist/dto/app-table/player.dto.js +11 -0
- package/dist/dto/app-table/player.dto.js.map +1 -1
- package/dist/dto/games/fool/fool-table.dto.d.ts +1 -0
- package/dist/dto/games/fool/fool-table.dto.js +10 -0
- package/dist/dto/games/fool/fool-table.dto.js.map +1 -1
- package/dist/modules/anti-freeze-system/anti-freeze-system.module.d.ts +3 -1
- package/dist/modules/anti-freeze-system/anti-freeze-system.module.js +8 -4
- package/dist/modules/anti-freeze-system/anti-freeze-system.module.js.map +1 -1
- package/dist/modules/anti-freeze-system/anti-freeze-system.service.d.ts +6 -2
- package/dist/modules/anti-freeze-system/anti-freeze-system.service.js +37 -10
- package/dist/modules/anti-freeze-system/anti-freeze-system.service.js.map +1 -1
- package/dist/modules/base-achievements/base-achievements.module.js +2 -2
- package/dist/modules/base-achievements/base-achievements.module.js.map +1 -1
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.constants.d.ts +1 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.constants.js +5 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.constants.js.map +1 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.interfaces.d.ts +13 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.interfaces.js +3 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.interfaces.js.map +1 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.module.d.ts +15 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.module.js +77 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.module.js.map +1 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.service.d.ts +19 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.service.js +83 -0
- package/dist/modules/confirmation-message-manager/confirmation-message-manager.service.js.map +1 -0
- package/dist/modules/event-bus/events-bus.module.js +3 -0
- package/dist/modules/event-bus/events-bus.module.js.map +1 -1
- package/dist/modules/event-bus/events-bus.player-ws-message.subscribe.service.d.ts +10 -0
- package/dist/modules/event-bus/events-bus.player-ws-message.subscribe.service.js +26 -0
- package/dist/modules/event-bus/events-bus.player-ws-message.subscribe.service.js.map +1 -0
- package/dist/modules/event-bus/index.d.ts +1 -0
- package/dist/modules/event-bus/index.js +3 -1
- package/dist/modules/event-bus/index.js.map +1 -1
- package/dist/modules/events/events.gateway.d.ts +6 -1
- package/dist/modules/events/events.gateway.js +19 -5
- package/dist/modules/events/events.gateway.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +3 -1
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/main/main.controller.d.ts +0 -1
- package/dist/modules/main/main.controller.js +0 -12
- package/dist/modules/main/main.controller.js.map +1 -1
- package/dist/modules/main/main.module.js +1 -1
- package/dist/modules/main/main.module.js.map +1 -1
- package/dist/modules/main/main.service.d.ts +0 -1
- package/dist/modules/main/main.service.js +0 -13
- package/dist/modules/main/main.service.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.d.ts +1 -0
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.js +12 -0
- package/dist/modules/many-tables-tournament/many-tables-tournament.controller.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.module.js +7 -2
- package/dist/modules/many-tables-tournament/many-tables-tournament.module.js.map +1 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.d.ts +4 -1
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.js +18 -2
- package/dist/modules/many-tables-tournament/many-tables-tournament.service.js.map +1 -1
- package/dist/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.module.js +2 -0
- package/dist/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.module.js.map +1 -1
- package/dist/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.service.d.ts +3 -2
- package/dist/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.service.js +9 -6
- package/dist/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.service.js.map +1 -1
- package/dist/modules/menu/menu-screen.view.d.ts +2 -1
- package/dist/modules/menu/menu-screen.view.js +9 -3
- package/dist/modules/menu/menu-screen.view.js.map +1 -1
- package/dist/modules/menu/menu.interfaces.d.ts +1 -0
- package/dist/modules/menu/menu.service.js +1 -1
- package/dist/modules/menu/menu.service.js.map +1 -1
- package/dist/modules/one-table-tournament/one-table-tournament.module.js +1 -1
- package/dist/modules/one-table-tournament/one-table-tournament.module.js.map +1 -1
- package/dist/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.module.js +2 -0
- package/dist/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.module.js.map +1 -1
- package/dist/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.service.d.ts +3 -2
- package/dist/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.service.js +9 -6
- package/dist/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.service.js.map +1 -1
- package/dist/modules/simple-rooms-manager/simple-rooms-manager.module.js +2 -0
- package/dist/modules/simple-rooms-manager/simple-rooms-manager.module.js.map +1 -1
- package/dist/modules/simple-rooms-manager/simple-rooms-manager.service.d.ts +3 -2
- package/dist/modules/simple-rooms-manager/simple-rooms-manager.service.js +8 -5
- package/dist/modules/simple-rooms-manager/simple-rooms-manager.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/game-table-result.d.ts +4 -3
- package/dist/utils/game-table-result.js +54 -4
- package/dist/utils/game-table-result.js.map +1 -1
- package/package.json +57 -57
- package/src/dto/app-screen/app-screen-app-bar.dto.ts +36 -36
- package/src/dto/app-screen/app-screen-dialog.dto.ts +64 -64
- package/src/dto/app-screen/app-screen-field-list-item.dto.ts +42 -42
- package/src/dto/app-screen/app-screen-field.dto.ts +59 -59
- package/src/dto/app-screen/app-screen-section-button.dto.ts +60 -60
- package/src/dto/app-screen/app-screen-section-buttons.dto.ts +14 -14
- package/src/dto/app-screen/app-screen-section-image.dto.ts +33 -33
- package/src/dto/app-screen/app-screen-section-list-item.dto.ts +105 -105
- package/src/dto/app-screen/app-screen-section-req.dto.ts +33 -33
- package/src/dto/app-screen/app-screen-section.dto.ts +76 -76
- package/src/dto/app-screen/app-screen.dto.ts +50 -50
- package/src/dto/app-screen/base-app-screen.dto.ts +16 -16
- package/src/dto/app-screen/index.ts +10 -10
- package/src/dto/app-table/bids-panel-item.dto.ts +33 -33
- package/src/dto/app-table/bids-panel.dto.ts +32 -32
- package/src/dto/app-table/card.dto.ts +63 -54
- package/src/dto/app-table/cards-deck.dto.ts +22 -22
- package/src/dto/app-table/cards-pair-slots-item.dto.ts +45 -45
- package/src/dto/app-table/cards-pair-slots.dto.ts +13 -13
- package/src/dto/app-table/cards-panel.dto.ts +48 -48
- package/src/dto/app-table/cards-player.dto.ts +14 -14
- package/src/dto/app-table/cards-slots-item.dto.ts +40 -40
- package/src/dto/app-table/cards-slots.dto.ts +13 -13
- package/src/dto/app-table/index.ts +15 -15
- package/src/dto/app-table/moves-panel-button.dto.ts +24 -24
- package/src/dto/app-table/moves-panel.dto.ts +23 -23
- package/src/dto/app-table/player.dto.ts +78 -69
- package/src/dto/app-table/summary-item.dto.ts +51 -51
- package/src/dto/app-table/summary.dto.ts +13 -13
- package/src/dto/common/find-free-table.dto.ts +3 -3
- package/src/dto/common/index.ts +2 -2
- package/src/dto/common/join-tournament.dto.ts +33 -33
- package/src/dto/common/log.dto.ts +9 -9
- package/src/dto/common/many-tables-tournament-create.dto.ts +125 -125
- package/src/dto/common/many-tables-tournament-update.dto.ts +3 -3
- package/src/dto/common/player-check-state.dto.ts +33 -33
- package/src/dto/common/player-connected.dto.ts +58 -58
- package/src/dto/games/fool/fool-player.dto.ts +3 -3
- package/src/dto/games/fool/fool-table.dto.ts +89 -81
- package/src/dto/games/index.ts +2 -2
- package/src/dto/games/poker/poker-player.dto.ts +3 -3
- package/src/dto/games/poker/poker-table.dto.ts +81 -81
- package/src/dto/index.ts +4 -4
- package/src/exception/error-code.enum.ts +4 -4
- package/src/exception/global-exception-filter.ts +53 -53
- package/src/exception/http-exception-wth-snackbar.ts +27 -27
- package/src/exception/index.ts +4 -4
- package/src/exception/not-enough-money-for-purchase.exception.ts +14 -14
- package/src/exception/not-found-free-room-for-fast-game.exception.ts +14 -14
- package/src/index.ts +4 -4
- package/src/modules/anti-freeze-system/anti-freeze-system.constants.ts +1 -1
- package/src/modules/anti-freeze-system/anti-freeze-system.interfaces.ts +20 -20
- package/src/modules/anti-freeze-system/anti-freeze-system.module.ts +59 -55
- package/src/modules/anti-freeze-system/anti-freeze-system.service.ts +136 -105
- package/src/modules/anti-freeze-system/index.ts +1 -1
- package/src/modules/base-achievements/base-achievements.module.ts +324 -322
- package/src/modules/base-achievements/index.ts +1 -1
- package/src/modules/confirmation-message-manager/confirmation-message-manager.constants.ts +3 -0
- package/src/modules/confirmation-message-manager/confirmation-message-manager.interfaces.ts +20 -0
- package/src/modules/confirmation-message-manager/confirmation-message-manager.module.ts +77 -0
- package/src/modules/confirmation-message-manager/confirmation-message-manager.service.ts +91 -0
- package/src/modules/event-bus/events-bus.app.subscribe.service.ts +20 -20
- package/src/modules/event-bus/events-bus.main-tables.subscribe.service.ts +34 -34
- package/src/modules/event-bus/events-bus.many-tables-tournament.subscribe.service.ts +6 -6
- package/src/modules/event-bus/events-bus.module.ts +26 -23
- package/src/modules/event-bus/events-bus.one-table-tournament.subscribe.service.ts +6 -6
- package/src/modules/event-bus/events-bus.player-ws-message.subscribe.service.ts +30 -0
- package/src/modules/event-bus/events-bus.tournament.subscribe.service.ts +18 -18
- package/src/modules/event-bus/index.ts +6 -5
- package/src/modules/events/events.constants.ts +1 -1
- package/src/modules/events/events.gateway.ts +84 -70
- package/src/modules/events/events.interfaces.ts +17 -17
- package/src/modules/events/events.module.ts +32 -32
- package/src/modules/events/index.ts +1 -1
- package/src/modules/index.ts +28 -27
- package/src/modules/logger/index.ts +2 -2
- package/src/modules/logger/jp-logger.module.ts +10 -10
- package/src/modules/logger/jp-logger.service.ts +38 -38
- package/src/modules/main/index.ts +1 -1
- package/src/modules/main/main-tables-list-screen.view.ts +275 -275
- package/src/modules/main/main.constants.ts +1 -1
- package/src/modules/main/main.controller.ts +51 -72
- package/src/modules/main/main.interfaces.ts +17 -17
- package/src/modules/main/main.module.ts +73 -73
- package/src/modules/main/main.service.ts +154 -183
- package/src/modules/many-tables-tournament/index.ts +1 -1
- package/src/modules/many-tables-tournament/many-tables-tournament-status-screen.view.ts +143 -143
- package/src/modules/many-tables-tournament/many-tables-tournament-tables-list-screen.view.ts +63 -63
- package/src/modules/many-tables-tournament/many-tables-tournament.constants.ts +3 -3
- package/src/modules/many-tables-tournament/many-tables-tournament.controller.ts +164 -151
- package/src/modules/many-tables-tournament/many-tables-tournament.interfaces.ts +20 -20
- package/src/modules/many-tables-tournament/many-tables-tournament.module.ts +89 -80
- package/src/modules/many-tables-tournament/many-tables-tournament.service.ts +241 -208
- package/src/modules/many-tables-tournament-rooms-manager/index.ts +2 -2
- package/src/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.constants.ts +3 -3
- package/src/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.interfaces.ts +37 -37
- package/src/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.module.ts +89 -84
- package/src/modules/many-tables-tournament-rooms-manager/many-tables-tournament-rooms-manager.service.ts +333 -331
- package/src/modules/menu/index.ts +1 -1
- package/src/modules/menu/menu-screen.view.ts +78 -71
- package/src/modules/menu/menu.constants.ts +1 -1
- package/src/modules/menu/menu.controller.ts +16 -16
- package/src/modules/menu/menu.interfaces.ts +18 -17
- package/src/modules/menu/menu.module.ts +39 -39
- package/src/modules/menu/menu.service.ts +40 -39
- package/src/modules/one-table-tournament/index.ts +1 -1
- package/src/modules/one-table-tournament/one-table-tournament-status-screen.view.ts +166 -166
- package/src/modules/one-table-tournament/one-table-tournament.constants.ts +3 -3
- package/src/modules/one-table-tournament/one-table-tournament.controller.ts +104 -104
- package/src/modules/one-table-tournament/one-table-tournament.interfaces.ts +20 -20
- package/src/modules/one-table-tournament/one-table-tournament.module.ts +80 -76
- package/src/modules/one-table-tournament/one-table-tournament.service.ts +146 -146
- package/src/modules/one-table-tournament-rooms-manager/index.ts +2 -2
- package/src/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.constants.ts +3 -3
- package/src/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.interfaces.ts +31 -31
- package/src/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.module.ts +71 -66
- package/src/modules/one-table-tournament-rooms-manager/one-table-tournament-rooms-manager.service.ts +222 -220
- package/src/modules/players-manager/index.ts +2 -2
- package/src/modules/players-manager/players-manager.module.ts +9 -9
- package/src/modules/players-manager/players-manager.service.ts +27 -27
- package/src/modules/simple-rooms/index.ts +1 -1
- package/src/modules/simple-rooms/simple-rooms.constants.ts +1 -1
- package/src/modules/simple-rooms/simple-rooms.controller.ts +63 -63
- package/src/modules/simple-rooms/simple-rooms.interfaces.ts +20 -20
- package/src/modules/simple-rooms/simple-rooms.module.ts +39 -39
- package/src/modules/simple-rooms/simple-rooms.service.ts +95 -95
- package/src/modules/simple-rooms-manager/index.ts +2 -2
- package/src/modules/simple-rooms-manager/simple-rooms-manager.constants.ts +3 -3
- package/src/modules/simple-rooms-manager/simple-rooms-manager.interfaces.ts +26 -26
- package/src/modules/simple-rooms-manager/simple-rooms-manager.module.ts +65 -60
- package/src/modules/simple-rooms-manager/simple-rooms-manager.service.ts +192 -190
- package/src/modules/support/dump.service.ts +11 -11
- package/src/modules/support/index.ts +1 -1
- package/src/modules/support/metric.service.ts +41 -41
- package/src/modules/support/support.constants.ts +1 -1
- package/src/modules/support/support.controller.ts +79 -79
- package/src/modules/support/support.interfaces.ts +16 -16
- package/src/modules/support/support.module.ts +35 -35
- package/src/modules/support/support.service.ts +27 -27
- package/src/utils/date.ts +7 -7
- package/src/utils/game-table-result.ts +190 -129
- package/src/views/index.ts +5 -5
- package/src/views/many-tables-tournament-conifrm-exit-dialog.view.ts +37 -37
- package/src/views/one-table-tournament-conifrm-exit-dialog.view.ts +37 -37
- package/src/views/simple-room-conifrm-exit-dialog.view.ts +37 -37
- package/src/views/table-summary.view.ts +104 -104
- package/src/views/tournament-buy-ticket-dialog.view.ts +34 -34
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Connection } from 'mongoose';
|
|
2
|
-
import { GameResultRepository, OneTableTournamentRoomsRepository, ManyTablesTournamentRoomsRepository, UsersRepository } from 'jp.db.schemas';
|
|
2
|
+
import { GameResultRepository, OneTableTournamentRoomsRepository, ManyTablesTournamentRoomsRepository, UsersRepository, RatingRepository } from 'jp.db.schemas';
|
|
3
3
|
import { GameMaster, TournamentMaster } from 'jp.ms.common.engine';
|
|
4
4
|
export declare function getGameTableResults(master: GameMaster): {
|
|
5
5
|
gameType: string;
|
|
@@ -35,5 +35,6 @@ export declare function getGameTableResults(master: GameMaster): {
|
|
|
35
35
|
}[];
|
|
36
36
|
}[];
|
|
37
37
|
};
|
|
38
|
-
export declare function
|
|
39
|
-
export declare function
|
|
38
|
+
export declare function saveGameTablesResultForSimpleRoom(master: GameMaster, connection: Connection, gameResultRepository: GameResultRepository, usersRepository: UsersRepository, ratingRepository: RatingRepository): Promise<void>;
|
|
39
|
+
export declare function saveGameTablesResultForTournamentRoom(master: GameMaster, connection: Connection, gameResultRepository: GameResultRepository, usersRepository: UsersRepository): Promise<void>;
|
|
40
|
+
export declare function saveTournamentResult(master: TournamentMaster, connection: Connection, tournamentRepository: OneTableTournamentRoomsRepository | ManyTablesTournamentRoomsRepository, usersRepository: UsersRepository, ratingRepository: RatingRepository): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getGameTableResults = getGameTableResults;
|
|
4
|
-
exports.
|
|
4
|
+
exports.saveGameTablesResultForSimpleRoom = saveGameTablesResultForSimpleRoom;
|
|
5
|
+
exports.saveGameTablesResultForTournamentRoom = saveGameTablesResultForTournamentRoom;
|
|
5
6
|
exports.saveTournamentResult = saveTournamentResult;
|
|
6
7
|
function getGameTableResults(master) {
|
|
7
8
|
return {
|
|
@@ -48,14 +49,53 @@ function getGameTableResults(master) {
|
|
|
48
49
|
})) ?? [],
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
async function
|
|
52
|
+
async function saveGameTablesResultForSimpleRoom(master, connection, gameResultRepository, usersRepository, ratingRepository) {
|
|
52
53
|
const userGameResult = master
|
|
53
54
|
.getTable()
|
|
54
55
|
.getPlayers()
|
|
55
56
|
.map((player) => {
|
|
56
57
|
return {
|
|
57
58
|
userId: player.id,
|
|
58
|
-
|
|
59
|
+
userName: player.fullName,
|
|
60
|
+
userAvatarUrl: player.avatarUrl,
|
|
61
|
+
balanceAdding: player.profit,
|
|
62
|
+
experienceAdding: master.levelHelper.getNewExperienceAmount(player),
|
|
63
|
+
levelAdding: master.levelHelper.getNewLevelAdding(player.level, player.experience),
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
const ratings = userGameResult.map((item) => ({
|
|
67
|
+
userId: item.userId,
|
|
68
|
+
userName: item.userName,
|
|
69
|
+
userAvatarUrl: item.userAvatarUrl,
|
|
70
|
+
profit: item.balanceAdding,
|
|
71
|
+
game: master.getRoom().getGameType(),
|
|
72
|
+
}));
|
|
73
|
+
const session = await connection.startSession();
|
|
74
|
+
session.startTransaction();
|
|
75
|
+
try {
|
|
76
|
+
await gameResultRepository.createGameResult(getGameTableResults(master));
|
|
77
|
+
await usersRepository.saveGameResult(userGameResult);
|
|
78
|
+
await ratingRepository.addBulkPlayerRating(ratings);
|
|
79
|
+
await session.commitTransaction();
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
await session.abortTransaction();
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
await session.endSession();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async function saveGameTablesResultForTournamentRoom(master, connection, gameResultRepository, usersRepository) {
|
|
90
|
+
const userGameResult = master
|
|
91
|
+
.getTable()
|
|
92
|
+
.getPlayers()
|
|
93
|
+
.map((player) => {
|
|
94
|
+
return {
|
|
95
|
+
userId: player.id,
|
|
96
|
+
userName: player.fullName,
|
|
97
|
+
userAvatarUrl: player.avatarUrl,
|
|
98
|
+
balanceAdding: 0,
|
|
59
99
|
experienceAdding: master.levelHelper.getNewExperienceAmount(player),
|
|
60
100
|
levelAdding: master.levelHelper.getNewLevelAdding(player.level, player.experience),
|
|
61
101
|
};
|
|
@@ -75,20 +115,30 @@ async function saveGameTablesResult(master, connection, gameResultRepository, us
|
|
|
75
115
|
await session.endSession();
|
|
76
116
|
}
|
|
77
117
|
}
|
|
78
|
-
async function saveTournamentResult(master, connection, tournamentRepository, usersRepository) {
|
|
118
|
+
async function saveTournamentResult(master, connection, tournamentRepository, usersRepository, ratingRepository) {
|
|
79
119
|
const userTournamentResult = master.getTournamentResult().map((player) => {
|
|
80
120
|
return {
|
|
81
121
|
userId: player.playerId,
|
|
122
|
+
userName: player.playerName,
|
|
123
|
+
userAvatarUrl: player.playerAvatarUrl,
|
|
82
124
|
balanceAdding: player.profit,
|
|
83
125
|
experienceAdding: 0,
|
|
84
126
|
levelAdding: 0,
|
|
85
127
|
};
|
|
86
128
|
});
|
|
129
|
+
const ratings = userTournamentResult.map((item) => ({
|
|
130
|
+
userId: item.userId,
|
|
131
|
+
userName: item.userName,
|
|
132
|
+
userAvatarUrl: item.userAvatarUrl,
|
|
133
|
+
profit: item.balanceAdding,
|
|
134
|
+
game: master.getRoom().getGameType(),
|
|
135
|
+
}));
|
|
87
136
|
const session = await connection.startSession();
|
|
88
137
|
session.startTransaction();
|
|
89
138
|
try {
|
|
90
139
|
await usersRepository.saveGameResult(userTournamentResult);
|
|
91
140
|
await tournamentRepository.finishTournament(master.getTournamentId(), master.getTournamentResult());
|
|
141
|
+
await ratingRepository.addBulkPlayerRating(ratings);
|
|
92
142
|
await session.commitTransaction();
|
|
93
143
|
}
|
|
94
144
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-table-result.js","sourceRoot":"","sources":["../../src/utils/game-table-result.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"game-table-result.js","sourceRoot":"","sources":["../../src/utils/game-table-result.ts"],"names":[],"mappings":";;AAUA,kDA8CC;AAED,8EA+CC;AAED,sFAoCC;AAED,oDA4CC;AAnLD,SAAgB,mBAAmB,CAAC,MAAkB;IACpD,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,WAAW,EAAE;QACxC,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;QAC5C,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE;QAChC,IAAI,EAAE,IAAI,IAAI,EAAE;QAChB,GAAG,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC;QACzC,OAAO,EAAE,MAAM;aACZ,QAAQ,EAAE;aACV,UAAU,EAAE;aACZ,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACd,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC;QACL,OAAO,EAAE,MAAM;aACZ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
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"author": "",
|
|
8
|
-
"license": "ISC",
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@nestjs/common": "^11.1.19",
|
|
11
|
-
"@nestjs/config": "^4.0.4",
|
|
12
|
-
"@nestjs/core": "11.1.0",
|
|
13
|
-
"@nestjs/mongoose": "11.0.4",
|
|
14
|
-
"@nestjs/websockets": "11.1.9",
|
|
15
|
-
"dayjs": "1.11.18",
|
|
16
|
-
"jp.common.models": "1.1.
|
|
17
|
-
"jp.common.utils": "1.0.6",
|
|
18
|
-
"jp.db.schemas": "2.2.
|
|
19
|
-
"jp.ms.common.engine": "3.0.
|
|
20
|
-
"mongoose": "9.1.5",
|
|
21
|
-
"nestjs-i18n": "10.5.1",
|
|
22
|
-
"node-schedule": "2.1.1",
|
|
23
|
-
"prom-client": "^15.1.0",
|
|
24
|
-
"reflect-metadata": "0.2.2",
|
|
25
|
-
"rxjs": "7.8.2",
|
|
26
|
-
"shuffle-array": "1.0.1",
|
|
27
|
-
"socket.io": "4.8.1"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@eslint/eslintrc": "^3.3.1",
|
|
31
|
-
"@eslint/js": "^9.32.0",
|
|
32
|
-
"@nestjs/swagger": "^11.4.1",
|
|
33
|
-
"@types/express": "^5.0.6",
|
|
34
|
-
"@types/node": "22.15.3",
|
|
35
|
-
"@types/node-schedule": "2.1.8",
|
|
36
|
-
"class-transformer": "0.5.1",
|
|
37
|
-
"class-validator": "0.14.3",
|
|
38
|
-
"eslint": "^9.32.0",
|
|
39
|
-
"eslint-config-prettier": "^10.1.8",
|
|
40
|
-
"eslint-plugin-prettier": "^5.5.3",
|
|
41
|
-
"globals": "^16.3.0",
|
|
42
|
-
"jest": "^30.0.5",
|
|
43
|
-
"prettier": "^3.6.2",
|
|
44
|
-
"rimraf": "6.0.1",
|
|
45
|
-
"typescript": "5.8.3",
|
|
46
|
-
"typescript-eslint": "^8.38.0"
|
|
47
|
-
},
|
|
48
|
-
"scripts": {
|
|
49
|
-
"build": "rimraf dist && tsc",
|
|
50
|
-
"prepublish": "npm run build",
|
|
51
|
-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
|
|
52
|
-
},
|
|
53
|
-
"files": [
|
|
54
|
-
"src",
|
|
55
|
-
"dist"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jp.ms.common.modules",
|
|
3
|
+
"version": "1.0.43",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"author": "",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@nestjs/common": "^11.1.19",
|
|
11
|
+
"@nestjs/config": "^4.0.4",
|
|
12
|
+
"@nestjs/core": "11.1.0",
|
|
13
|
+
"@nestjs/mongoose": "11.0.4",
|
|
14
|
+
"@nestjs/websockets": "11.1.9",
|
|
15
|
+
"dayjs": "1.11.18",
|
|
16
|
+
"jp.common.models": "1.1.50",
|
|
17
|
+
"jp.common.utils": "1.0.6",
|
|
18
|
+
"jp.db.schemas": "2.2.16",
|
|
19
|
+
"jp.ms.common.engine": "3.0.26",
|
|
20
|
+
"mongoose": "9.1.5",
|
|
21
|
+
"nestjs-i18n": "10.5.1",
|
|
22
|
+
"node-schedule": "2.1.1",
|
|
23
|
+
"prom-client": "^15.1.0",
|
|
24
|
+
"reflect-metadata": "0.2.2",
|
|
25
|
+
"rxjs": "7.8.2",
|
|
26
|
+
"shuffle-array": "1.0.1",
|
|
27
|
+
"socket.io": "4.8.1"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
31
|
+
"@eslint/js": "^9.32.0",
|
|
32
|
+
"@nestjs/swagger": "^11.4.1",
|
|
33
|
+
"@types/express": "^5.0.6",
|
|
34
|
+
"@types/node": "22.15.3",
|
|
35
|
+
"@types/node-schedule": "2.1.8",
|
|
36
|
+
"class-transformer": "0.5.1",
|
|
37
|
+
"class-validator": "0.14.3",
|
|
38
|
+
"eslint": "^9.32.0",
|
|
39
|
+
"eslint-config-prettier": "^10.1.8",
|
|
40
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
41
|
+
"globals": "^16.3.0",
|
|
42
|
+
"jest": "^30.0.5",
|
|
43
|
+
"prettier": "^3.6.2",
|
|
44
|
+
"rimraf": "6.0.1",
|
|
45
|
+
"typescript": "5.8.3",
|
|
46
|
+
"typescript-eslint": "^8.38.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "rimraf dist && tsc",
|
|
50
|
+
"prepublish": "npm run build",
|
|
51
|
+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"src",
|
|
55
|
+
"dist"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import { IAppScreenAppBar } from 'jp.common.models';
|
|
3
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
4
|
-
import { IsArray, IsString, ValidateNested } from 'class-validator';
|
|
5
|
-
|
|
6
|
-
import { AppScreenSectionButtonDto } from './app-screen-section-button.dto';
|
|
7
|
-
|
|
8
|
-
export class AppScreenAppBarDto implements IAppScreenAppBar {
|
|
9
|
-
@ApiProperty({
|
|
10
|
-
description: 'title',
|
|
11
|
-
required: true,
|
|
12
|
-
type: String,
|
|
13
|
-
})
|
|
14
|
-
@Expose()
|
|
15
|
-
@IsString()
|
|
16
|
-
title: string;
|
|
17
|
-
|
|
18
|
-
@ApiProperty({
|
|
19
|
-
description: 'type',
|
|
20
|
-
required: true,
|
|
21
|
-
type: String,
|
|
22
|
-
})
|
|
23
|
-
@Expose()
|
|
24
|
-
@IsString()
|
|
25
|
-
type: string;
|
|
26
|
-
|
|
27
|
-
@IsArray()
|
|
28
|
-
@ValidateNested({ each: true })
|
|
29
|
-
@Type(() => AppScreenSectionButtonDto)
|
|
30
|
-
@Expose()
|
|
31
|
-
actions: Array<AppScreenSectionButtonDto>;
|
|
32
|
-
|
|
33
|
-
@Type(() => AppScreenSectionButtonDto)
|
|
34
|
-
@Expose()
|
|
35
|
-
leading: AppScreenSectionButtonDto;
|
|
36
|
-
}
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IAppScreenAppBar } from 'jp.common.models';
|
|
3
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
4
|
+
import { IsArray, IsString, ValidateNested } from 'class-validator';
|
|
5
|
+
|
|
6
|
+
import { AppScreenSectionButtonDto } from './app-screen-section-button.dto';
|
|
7
|
+
|
|
8
|
+
export class AppScreenAppBarDto implements IAppScreenAppBar {
|
|
9
|
+
@ApiProperty({
|
|
10
|
+
description: 'title',
|
|
11
|
+
required: true,
|
|
12
|
+
type: String,
|
|
13
|
+
})
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsString()
|
|
16
|
+
title: string;
|
|
17
|
+
|
|
18
|
+
@ApiProperty({
|
|
19
|
+
description: 'type',
|
|
20
|
+
required: true,
|
|
21
|
+
type: String,
|
|
22
|
+
})
|
|
23
|
+
@Expose()
|
|
24
|
+
@IsString()
|
|
25
|
+
type: string;
|
|
26
|
+
|
|
27
|
+
@IsArray()
|
|
28
|
+
@ValidateNested({ each: true })
|
|
29
|
+
@Type(() => AppScreenSectionButtonDto)
|
|
30
|
+
@Expose()
|
|
31
|
+
actions: Array<AppScreenSectionButtonDto>;
|
|
32
|
+
|
|
33
|
+
@Type(() => AppScreenSectionButtonDto)
|
|
34
|
+
@Expose()
|
|
35
|
+
leading: AppScreenSectionButtonDto;
|
|
36
|
+
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import { IAppScreenDialog } from 'jp.common.models';
|
|
3
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
4
|
-
import { IsArray, IsString, ValidateNested } from 'class-validator';
|
|
5
|
-
|
|
6
|
-
import { AppScreenSectionButtonsDto } from './app-screen-section-buttons.dto';
|
|
7
|
-
import { AppScreenFieldDto } from './app-screen-field.dto';
|
|
8
|
-
|
|
9
|
-
export class AppScreenDialogDto implements IAppScreenDialog {
|
|
10
|
-
@ApiProperty({
|
|
11
|
-
description: 'id',
|
|
12
|
-
required: true,
|
|
13
|
-
type: String,
|
|
14
|
-
})
|
|
15
|
-
@Expose()
|
|
16
|
-
@IsString()
|
|
17
|
-
id: string;
|
|
18
|
-
|
|
19
|
-
@ApiProperty({
|
|
20
|
-
description: 'type',
|
|
21
|
-
required: true,
|
|
22
|
-
type: String,
|
|
23
|
-
})
|
|
24
|
-
@Expose()
|
|
25
|
-
@IsString()
|
|
26
|
-
type: string;
|
|
27
|
-
|
|
28
|
-
@ApiProperty({
|
|
29
|
-
description: 'isOpen',
|
|
30
|
-
required: true,
|
|
31
|
-
type: Boolean,
|
|
32
|
-
})
|
|
33
|
-
@Expose()
|
|
34
|
-
@IsString()
|
|
35
|
-
isOpen: boolean;
|
|
36
|
-
|
|
37
|
-
@ApiProperty({
|
|
38
|
-
description: 'title',
|
|
39
|
-
required: true,
|
|
40
|
-
type: String,
|
|
41
|
-
})
|
|
42
|
-
@Expose()
|
|
43
|
-
@IsString()
|
|
44
|
-
title: string;
|
|
45
|
-
|
|
46
|
-
@ApiProperty({
|
|
47
|
-
description: 'description',
|
|
48
|
-
required: true,
|
|
49
|
-
type: String,
|
|
50
|
-
})
|
|
51
|
-
@Expose()
|
|
52
|
-
@IsString()
|
|
53
|
-
description?: string;
|
|
54
|
-
|
|
55
|
-
@Type(() => AppScreenSectionButtonsDto)
|
|
56
|
-
@Expose()
|
|
57
|
-
buttons: AppScreenSectionButtonsDto;
|
|
58
|
-
|
|
59
|
-
@IsArray()
|
|
60
|
-
@ValidateNested({ each: true })
|
|
61
|
-
@Type(() => AppScreenFieldDto)
|
|
62
|
-
@Expose()
|
|
63
|
-
fields?: Array<AppScreenFieldDto>;
|
|
64
|
-
}
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { IAppScreenDialog } from 'jp.common.models';
|
|
3
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
4
|
+
import { IsArray, IsString, ValidateNested } from 'class-validator';
|
|
5
|
+
|
|
6
|
+
import { AppScreenSectionButtonsDto } from './app-screen-section-buttons.dto';
|
|
7
|
+
import { AppScreenFieldDto } from './app-screen-field.dto';
|
|
8
|
+
|
|
9
|
+
export class AppScreenDialogDto implements IAppScreenDialog {
|
|
10
|
+
@ApiProperty({
|
|
11
|
+
description: 'id',
|
|
12
|
+
required: true,
|
|
13
|
+
type: String,
|
|
14
|
+
})
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
id: string;
|
|
18
|
+
|
|
19
|
+
@ApiProperty({
|
|
20
|
+
description: 'type',
|
|
21
|
+
required: true,
|
|
22
|
+
type: String,
|
|
23
|
+
})
|
|
24
|
+
@Expose()
|
|
25
|
+
@IsString()
|
|
26
|
+
type: string;
|
|
27
|
+
|
|
28
|
+
@ApiProperty({
|
|
29
|
+
description: 'isOpen',
|
|
30
|
+
required: true,
|
|
31
|
+
type: Boolean,
|
|
32
|
+
})
|
|
33
|
+
@Expose()
|
|
34
|
+
@IsString()
|
|
35
|
+
isOpen: boolean;
|
|
36
|
+
|
|
37
|
+
@ApiProperty({
|
|
38
|
+
description: 'title',
|
|
39
|
+
required: true,
|
|
40
|
+
type: String,
|
|
41
|
+
})
|
|
42
|
+
@Expose()
|
|
43
|
+
@IsString()
|
|
44
|
+
title: string;
|
|
45
|
+
|
|
46
|
+
@ApiProperty({
|
|
47
|
+
description: 'description',
|
|
48
|
+
required: true,
|
|
49
|
+
type: String,
|
|
50
|
+
})
|
|
51
|
+
@Expose()
|
|
52
|
+
@IsString()
|
|
53
|
+
description?: string;
|
|
54
|
+
|
|
55
|
+
@Type(() => AppScreenSectionButtonsDto)
|
|
56
|
+
@Expose()
|
|
57
|
+
buttons: AppScreenSectionButtonsDto;
|
|
58
|
+
|
|
59
|
+
@IsArray()
|
|
60
|
+
@ValidateNested({ each: true })
|
|
61
|
+
@Type(() => AppScreenFieldDto)
|
|
62
|
+
@Expose()
|
|
63
|
+
fields?: Array<AppScreenFieldDto>;
|
|
64
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
-
import { Expose } from 'class-transformer';
|
|
3
|
-
import { IsBoolean, IsString } from 'class-validator';
|
|
4
|
-
import { IAppScreenFieldListItem } from 'jp.common.models';
|
|
5
|
-
|
|
6
|
-
export class AppScreenFieldListItemDto implements IAppScreenFieldListItem {
|
|
7
|
-
@ApiProperty({
|
|
8
|
-
description: 'id',
|
|
9
|
-
required: true,
|
|
10
|
-
type: String,
|
|
11
|
-
})
|
|
12
|
-
@Expose()
|
|
13
|
-
@IsString()
|
|
14
|
-
id: string;
|
|
15
|
-
|
|
16
|
-
@ApiProperty({
|
|
17
|
-
description: 'title',
|
|
18
|
-
required: true,
|
|
19
|
-
type: String,
|
|
20
|
-
})
|
|
21
|
-
@Expose()
|
|
22
|
-
@IsString()
|
|
23
|
-
title: string;
|
|
24
|
-
|
|
25
|
-
@ApiProperty({
|
|
26
|
-
description: 'imageUrl',
|
|
27
|
-
required: true,
|
|
28
|
-
type: String,
|
|
29
|
-
})
|
|
30
|
-
@Expose()
|
|
31
|
-
@IsString()
|
|
32
|
-
imageUrl: string;
|
|
33
|
-
|
|
34
|
-
@ApiProperty({
|
|
35
|
-
description: 'disabled',
|
|
36
|
-
required: true,
|
|
37
|
-
type: Boolean,
|
|
38
|
-
})
|
|
39
|
-
@Expose()
|
|
40
|
-
@IsBoolean()
|
|
41
|
-
disabled: boolean;
|
|
42
|
-
}
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { Expose } from 'class-transformer';
|
|
3
|
+
import { IsBoolean, IsString } from 'class-validator';
|
|
4
|
+
import { IAppScreenFieldListItem } from 'jp.common.models';
|
|
5
|
+
|
|
6
|
+
export class AppScreenFieldListItemDto implements IAppScreenFieldListItem {
|
|
7
|
+
@ApiProperty({
|
|
8
|
+
description: 'id',
|
|
9
|
+
required: true,
|
|
10
|
+
type: String,
|
|
11
|
+
})
|
|
12
|
+
@Expose()
|
|
13
|
+
@IsString()
|
|
14
|
+
id: string;
|
|
15
|
+
|
|
16
|
+
@ApiProperty({
|
|
17
|
+
description: 'title',
|
|
18
|
+
required: true,
|
|
19
|
+
type: String,
|
|
20
|
+
})
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsString()
|
|
23
|
+
title: string;
|
|
24
|
+
|
|
25
|
+
@ApiProperty({
|
|
26
|
+
description: 'imageUrl',
|
|
27
|
+
required: true,
|
|
28
|
+
type: String,
|
|
29
|
+
})
|
|
30
|
+
@Expose()
|
|
31
|
+
@IsString()
|
|
32
|
+
imageUrl: string;
|
|
33
|
+
|
|
34
|
+
@ApiProperty({
|
|
35
|
+
description: 'disabled',
|
|
36
|
+
required: true,
|
|
37
|
+
type: Boolean,
|
|
38
|
+
})
|
|
39
|
+
@Expose()
|
|
40
|
+
@IsBoolean()
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
-
import { Expose, Type } from 'class-transformer';
|
|
3
|
-
import { IsArray, IsString, ValidateNested } from 'class-validator';
|
|
4
|
-
import { IAppScreenField } from 'jp.common.models';
|
|
5
|
-
|
|
6
|
-
import { AppScreenFieldListItemDto } from './app-screen-field-list-item.dto';
|
|
7
|
-
|
|
8
|
-
export class AppScreenFieldDto implements IAppScreenField {
|
|
9
|
-
@ApiProperty({
|
|
10
|
-
description: 'id',
|
|
11
|
-
required: true,
|
|
12
|
-
type: String,
|
|
13
|
-
})
|
|
14
|
-
@Expose()
|
|
15
|
-
@IsString()
|
|
16
|
-
id: string;
|
|
17
|
-
|
|
18
|
-
@ApiProperty({
|
|
19
|
-
description: 'type',
|
|
20
|
-
required: true,
|
|
21
|
-
type: String,
|
|
22
|
-
})
|
|
23
|
-
@Expose()
|
|
24
|
-
@IsString()
|
|
25
|
-
type: string;
|
|
26
|
-
|
|
27
|
-
@ApiProperty({
|
|
28
|
-
description: 'label',
|
|
29
|
-
required: false,
|
|
30
|
-
type: String,
|
|
31
|
-
})
|
|
32
|
-
@Expose()
|
|
33
|
-
@IsString()
|
|
34
|
-
label?: string;
|
|
35
|
-
|
|
36
|
-
@ApiProperty({
|
|
37
|
-
description: 'placeholder',
|
|
38
|
-
required: true,
|
|
39
|
-
type: String,
|
|
40
|
-
})
|
|
41
|
-
@Expose()
|
|
42
|
-
@IsString()
|
|
43
|
-
placeholder?: string;
|
|
44
|
-
|
|
45
|
-
@ApiProperty({
|
|
46
|
-
description: 'value',
|
|
47
|
-
required: true,
|
|
48
|
-
type: String,
|
|
49
|
-
})
|
|
50
|
-
@Expose()
|
|
51
|
-
@IsString()
|
|
52
|
-
value: string;
|
|
53
|
-
|
|
54
|
-
@IsArray()
|
|
55
|
-
@ValidateNested({ each: true })
|
|
56
|
-
@Type(() => AppScreenFieldListItemDto)
|
|
57
|
-
@Expose()
|
|
58
|
-
list?: Array<AppScreenFieldListItemDto>;
|
|
59
|
-
}
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { Expose, Type } from 'class-transformer';
|
|
3
|
+
import { IsArray, IsString, ValidateNested } from 'class-validator';
|
|
4
|
+
import { IAppScreenField } from 'jp.common.models';
|
|
5
|
+
|
|
6
|
+
import { AppScreenFieldListItemDto } from './app-screen-field-list-item.dto';
|
|
7
|
+
|
|
8
|
+
export class AppScreenFieldDto implements IAppScreenField {
|
|
9
|
+
@ApiProperty({
|
|
10
|
+
description: 'id',
|
|
11
|
+
required: true,
|
|
12
|
+
type: String,
|
|
13
|
+
})
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsString()
|
|
16
|
+
id: string;
|
|
17
|
+
|
|
18
|
+
@ApiProperty({
|
|
19
|
+
description: 'type',
|
|
20
|
+
required: true,
|
|
21
|
+
type: String,
|
|
22
|
+
})
|
|
23
|
+
@Expose()
|
|
24
|
+
@IsString()
|
|
25
|
+
type: string;
|
|
26
|
+
|
|
27
|
+
@ApiProperty({
|
|
28
|
+
description: 'label',
|
|
29
|
+
required: false,
|
|
30
|
+
type: String,
|
|
31
|
+
})
|
|
32
|
+
@Expose()
|
|
33
|
+
@IsString()
|
|
34
|
+
label?: string;
|
|
35
|
+
|
|
36
|
+
@ApiProperty({
|
|
37
|
+
description: 'placeholder',
|
|
38
|
+
required: true,
|
|
39
|
+
type: String,
|
|
40
|
+
})
|
|
41
|
+
@Expose()
|
|
42
|
+
@IsString()
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
|
|
45
|
+
@ApiProperty({
|
|
46
|
+
description: 'value',
|
|
47
|
+
required: true,
|
|
48
|
+
type: String,
|
|
49
|
+
})
|
|
50
|
+
@Expose()
|
|
51
|
+
@IsString()
|
|
52
|
+
value: string;
|
|
53
|
+
|
|
54
|
+
@IsArray()
|
|
55
|
+
@ValidateNested({ each: true })
|
|
56
|
+
@Type(() => AppScreenFieldListItemDto)
|
|
57
|
+
@Expose()
|
|
58
|
+
list?: Array<AppScreenFieldListItemDto>;
|
|
59
|
+
}
|