trucoshi 2.5.2 → 3.0.0
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/types.d.ts +19 -2
- package/package.json +2 -1
- package/prisma/client/index-browser.js +2 -0
- package/prisma/client/index.d.ts +73 -0
- package/prisma/client/index.js +3 -1
- package/prisma/client/schema.prisma +2 -0
- package/prisma/migrations/20240126035758_/migration.sql +28 -0
- package/prisma/migrations/20240126035829_/migration.sql +3 -0
- package/prisma/schema.prisma +2 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { User } from "lightning-accounts";
|
|
2
2
|
import { CARDS, IHand } from "./lib";
|
|
3
|
-
import { IUserData } from "./server";
|
|
4
3
|
import { SocketError } from "./server/classes/SocketError";
|
|
5
4
|
import { Match, MatchPlayer, MatchHand, UserStats } from "@trucoshi/prisma";
|
|
6
5
|
export { CARDS, CARDS_HUMAN_READABLE, BURNT_CARD } from "./lib/constants";
|
|
@@ -19,6 +18,12 @@ export declare enum EMatchState {
|
|
|
19
18
|
STARTED = "STARTED",
|
|
20
19
|
FINISHED = "FINISHED"
|
|
21
20
|
}
|
|
21
|
+
export interface IUserData {
|
|
22
|
+
key: string;
|
|
23
|
+
name: string;
|
|
24
|
+
session: string;
|
|
25
|
+
account: User | null;
|
|
26
|
+
}
|
|
22
27
|
export interface ILobbyOptions {
|
|
23
28
|
maxPlayers: 2 | 4 | 6;
|
|
24
29
|
faltaEnvido: 1 | 2;
|
|
@@ -264,11 +269,12 @@ export type IEnvidoCalculator = {
|
|
|
264
269
|
[key in EEnvidoCommand]: (args?: IEnvidoCalculatorArgs) => IEnvidoCalculatorResult;
|
|
265
270
|
};
|
|
266
271
|
export interface IDeck {
|
|
272
|
+
random: IRandom;
|
|
267
273
|
cards: Array<ICard>;
|
|
268
274
|
usedCards: Array<ICard>;
|
|
269
275
|
takeCard(): ICard;
|
|
270
276
|
takeThree(): [ICard, ICard, ICard];
|
|
271
|
-
shuffle(): IDeck;
|
|
277
|
+
shuffle(dealerIdx: number): IDeck;
|
|
272
278
|
}
|
|
273
279
|
export type ICard = keyof typeof CARDS;
|
|
274
280
|
export interface IPlayedCard {
|
|
@@ -280,6 +286,17 @@ export interface IHandPoints {
|
|
|
280
286
|
0: number;
|
|
281
287
|
1: number;
|
|
282
288
|
}
|
|
289
|
+
export interface IRandom {
|
|
290
|
+
secret: string;
|
|
291
|
+
clients: string[];
|
|
292
|
+
nonce: number;
|
|
293
|
+
next(): void;
|
|
294
|
+
pick(idx: number, max: number): number;
|
|
295
|
+
reveal(): {
|
|
296
|
+
secret: string;
|
|
297
|
+
clients: string[];
|
|
298
|
+
};
|
|
299
|
+
}
|
|
283
300
|
export type IPublicPlayer = Pick<IPlayer, "name" | "key" | "disabled" | "abandoned" | "ready" | "hand" | "usedHand" | "prevHand" | "teamIdx" | "isTurn" | "turnExpiresAt" | "turnExtensionExpiresAt" | "isEnvidoTurn" | "isOwner"> & ({
|
|
284
301
|
isMe?: true;
|
|
285
302
|
commands: IPlayer["commands"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trucoshi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Lightning Truco Server",
|
|
5
5
|
"main": "dist/types.js",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"pino": "^8.11.0",
|
|
75
75
|
"pino-pretty": "^10.0.0",
|
|
76
76
|
"rimraf": "^4.1.1",
|
|
77
|
+
"safe-rng": "^1.0.4",
|
|
77
78
|
"socket.io": "^4.5.4",
|
|
78
79
|
"ts-node": "^10.9.1",
|
|
79
80
|
"tsc": "^2.0.4",
|
package/prisma/client/index.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ export type MatchHand = {
|
|
|
65
65
|
createdAt: Date
|
|
66
66
|
updatedAt: Date
|
|
67
67
|
idx: number
|
|
68
|
+
secret: string
|
|
69
|
+
clientSecrets: string[]
|
|
68
70
|
rounds: Prisma.JsonValue
|
|
69
71
|
results: Prisma.JsonValue
|
|
70
72
|
matchId: number
|
|
@@ -3995,6 +3997,7 @@ export namespace Prisma {
|
|
|
3995
3997
|
createdAt: Date | null
|
|
3996
3998
|
updatedAt: Date | null
|
|
3997
3999
|
idx: number | null
|
|
4000
|
+
secret: string | null
|
|
3998
4001
|
matchId: number | null
|
|
3999
4002
|
trucoWinnerIdx: number | null
|
|
4000
4003
|
envidoWinnerIdx: number | null
|
|
@@ -4006,6 +4009,7 @@ export namespace Prisma {
|
|
|
4006
4009
|
createdAt: Date | null
|
|
4007
4010
|
updatedAt: Date | null
|
|
4008
4011
|
idx: number | null
|
|
4012
|
+
secret: string | null
|
|
4009
4013
|
matchId: number | null
|
|
4010
4014
|
trucoWinnerIdx: number | null
|
|
4011
4015
|
envidoWinnerIdx: number | null
|
|
@@ -4017,6 +4021,8 @@ export namespace Prisma {
|
|
|
4017
4021
|
createdAt: number
|
|
4018
4022
|
updatedAt: number
|
|
4019
4023
|
idx: number
|
|
4024
|
+
secret: number
|
|
4025
|
+
clientSecrets: number
|
|
4020
4026
|
rounds: number
|
|
4021
4027
|
results: number
|
|
4022
4028
|
matchId: number
|
|
@@ -4050,6 +4056,7 @@ export namespace Prisma {
|
|
|
4050
4056
|
createdAt?: true
|
|
4051
4057
|
updatedAt?: true
|
|
4052
4058
|
idx?: true
|
|
4059
|
+
secret?: true
|
|
4053
4060
|
matchId?: true
|
|
4054
4061
|
trucoWinnerIdx?: true
|
|
4055
4062
|
envidoWinnerIdx?: true
|
|
@@ -4061,6 +4068,7 @@ export namespace Prisma {
|
|
|
4061
4068
|
createdAt?: true
|
|
4062
4069
|
updatedAt?: true
|
|
4063
4070
|
idx?: true
|
|
4071
|
+
secret?: true
|
|
4064
4072
|
matchId?: true
|
|
4065
4073
|
trucoWinnerIdx?: true
|
|
4066
4074
|
envidoWinnerIdx?: true
|
|
@@ -4072,6 +4080,8 @@ export namespace Prisma {
|
|
|
4072
4080
|
createdAt?: true
|
|
4073
4081
|
updatedAt?: true
|
|
4074
4082
|
idx?: true
|
|
4083
|
+
secret?: true
|
|
4084
|
+
clientSecrets?: true
|
|
4075
4085
|
rounds?: true
|
|
4076
4086
|
results?: true
|
|
4077
4087
|
matchId?: true
|
|
@@ -4173,6 +4183,8 @@ export namespace Prisma {
|
|
|
4173
4183
|
createdAt: Date
|
|
4174
4184
|
updatedAt: Date
|
|
4175
4185
|
idx: number
|
|
4186
|
+
secret: string
|
|
4187
|
+
clientSecrets: string[]
|
|
4176
4188
|
rounds: JsonValue
|
|
4177
4189
|
results: JsonValue
|
|
4178
4190
|
matchId: number
|
|
@@ -4205,6 +4217,8 @@ export namespace Prisma {
|
|
|
4205
4217
|
createdAt?: boolean
|
|
4206
4218
|
updatedAt?: boolean
|
|
4207
4219
|
idx?: boolean
|
|
4220
|
+
secret?: boolean
|
|
4221
|
+
clientSecrets?: boolean
|
|
4208
4222
|
rounds?: boolean
|
|
4209
4223
|
results?: boolean
|
|
4210
4224
|
matchId?: boolean
|
|
@@ -6066,6 +6080,8 @@ export namespace Prisma {
|
|
|
6066
6080
|
createdAt: 'createdAt',
|
|
6067
6081
|
updatedAt: 'updatedAt',
|
|
6068
6082
|
idx: 'idx',
|
|
6083
|
+
secret: 'secret',
|
|
6084
|
+
clientSecrets: 'clientSecrets',
|
|
6069
6085
|
rounds: 'rounds',
|
|
6070
6086
|
results: 'results',
|
|
6071
6087
|
matchId: 'matchId',
|
|
@@ -6345,6 +6361,8 @@ export namespace Prisma {
|
|
|
6345
6361
|
createdAt?: DateTimeFilter | Date | string
|
|
6346
6362
|
updatedAt?: DateTimeFilter | Date | string
|
|
6347
6363
|
idx?: IntFilter | number
|
|
6364
|
+
secret?: StringFilter | string
|
|
6365
|
+
clientSecrets?: StringNullableListFilter
|
|
6348
6366
|
rounds?: JsonFilter
|
|
6349
6367
|
results?: JsonFilter
|
|
6350
6368
|
matchId?: IntFilter | number
|
|
@@ -6359,6 +6377,8 @@ export namespace Prisma {
|
|
|
6359
6377
|
createdAt?: SortOrder
|
|
6360
6378
|
updatedAt?: SortOrder
|
|
6361
6379
|
idx?: SortOrder
|
|
6380
|
+
secret?: SortOrder
|
|
6381
|
+
clientSecrets?: SortOrder
|
|
6362
6382
|
rounds?: SortOrder
|
|
6363
6383
|
results?: SortOrder
|
|
6364
6384
|
matchId?: SortOrder
|
|
@@ -6377,6 +6397,8 @@ export namespace Prisma {
|
|
|
6377
6397
|
createdAt?: SortOrder
|
|
6378
6398
|
updatedAt?: SortOrder
|
|
6379
6399
|
idx?: SortOrder
|
|
6400
|
+
secret?: SortOrder
|
|
6401
|
+
clientSecrets?: SortOrder
|
|
6380
6402
|
rounds?: SortOrder
|
|
6381
6403
|
results?: SortOrder
|
|
6382
6404
|
matchId?: SortOrder
|
|
@@ -6398,6 +6420,8 @@ export namespace Prisma {
|
|
|
6398
6420
|
createdAt?: DateTimeWithAggregatesFilter | Date | string
|
|
6399
6421
|
updatedAt?: DateTimeWithAggregatesFilter | Date | string
|
|
6400
6422
|
idx?: IntWithAggregatesFilter | number
|
|
6423
|
+
secret?: StringWithAggregatesFilter | string
|
|
6424
|
+
clientSecrets?: StringNullableListFilter
|
|
6401
6425
|
rounds?: JsonWithAggregatesFilter
|
|
6402
6426
|
results?: JsonWithAggregatesFilter
|
|
6403
6427
|
matchId?: IntWithAggregatesFilter | number
|
|
@@ -6713,6 +6737,8 @@ export namespace Prisma {
|
|
|
6713
6737
|
createdAt?: Date | string
|
|
6714
6738
|
updatedAt?: Date | string
|
|
6715
6739
|
idx: number
|
|
6740
|
+
secret?: string
|
|
6741
|
+
clientSecrets?: MatchHandCreateclientSecretsInput | Enumerable<string>
|
|
6716
6742
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6717
6743
|
results?: JsonNullValueInput | InputJsonValue
|
|
6718
6744
|
trucoWinnerIdx?: number | null
|
|
@@ -6726,6 +6752,8 @@ export namespace Prisma {
|
|
|
6726
6752
|
createdAt?: Date | string
|
|
6727
6753
|
updatedAt?: Date | string
|
|
6728
6754
|
idx: number
|
|
6755
|
+
secret?: string
|
|
6756
|
+
clientSecrets?: MatchHandCreateclientSecretsInput | Enumerable<string>
|
|
6729
6757
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6730
6758
|
results?: JsonNullValueInput | InputJsonValue
|
|
6731
6759
|
matchId: number
|
|
@@ -6738,6 +6766,8 @@ export namespace Prisma {
|
|
|
6738
6766
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6739
6767
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6740
6768
|
idx?: IntFieldUpdateOperationsInput | number
|
|
6769
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
6770
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
6741
6771
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6742
6772
|
results?: JsonNullValueInput | InputJsonValue
|
|
6743
6773
|
trucoWinnerIdx?: NullableIntFieldUpdateOperationsInput | number | null
|
|
@@ -6751,6 +6781,8 @@ export namespace Prisma {
|
|
|
6751
6781
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6752
6782
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6753
6783
|
idx?: IntFieldUpdateOperationsInput | number
|
|
6784
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
6785
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
6754
6786
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6755
6787
|
results?: JsonNullValueInput | InputJsonValue
|
|
6756
6788
|
matchId?: IntFieldUpdateOperationsInput | number
|
|
@@ -6764,6 +6796,8 @@ export namespace Prisma {
|
|
|
6764
6796
|
createdAt?: Date | string
|
|
6765
6797
|
updatedAt?: Date | string
|
|
6766
6798
|
idx: number
|
|
6799
|
+
secret?: string
|
|
6800
|
+
clientSecrets?: MatchHandCreateclientSecretsInput | Enumerable<string>
|
|
6767
6801
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6768
6802
|
results?: JsonNullValueInput | InputJsonValue
|
|
6769
6803
|
matchId: number
|
|
@@ -6776,6 +6810,8 @@ export namespace Prisma {
|
|
|
6776
6810
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6777
6811
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6778
6812
|
idx?: IntFieldUpdateOperationsInput | number
|
|
6813
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
6814
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
6779
6815
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6780
6816
|
results?: JsonNullValueInput | InputJsonValue
|
|
6781
6817
|
trucoWinnerIdx?: NullableIntFieldUpdateOperationsInput | number | null
|
|
@@ -6788,6 +6824,8 @@ export namespace Prisma {
|
|
|
6788
6824
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6789
6825
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
6790
6826
|
idx?: IntFieldUpdateOperationsInput | number
|
|
6827
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
6828
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
6791
6829
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
6792
6830
|
results?: JsonNullValueInput | InputJsonValue
|
|
6793
6831
|
matchId?: IntFieldUpdateOperationsInput | number
|
|
@@ -7252,11 +7290,21 @@ export namespace Prisma {
|
|
|
7252
7290
|
_max?: NestedBoolFilter
|
|
7253
7291
|
}
|
|
7254
7292
|
|
|
7293
|
+
export type StringNullableListFilter = {
|
|
7294
|
+
equals?: Enumerable<string> | null
|
|
7295
|
+
has?: string | null
|
|
7296
|
+
hasEvery?: Enumerable<string>
|
|
7297
|
+
hasSome?: Enumerable<string>
|
|
7298
|
+
isEmpty?: boolean
|
|
7299
|
+
}
|
|
7300
|
+
|
|
7255
7301
|
export type MatchHandCountOrderByAggregateInput = {
|
|
7256
7302
|
id?: SortOrder
|
|
7257
7303
|
createdAt?: SortOrder
|
|
7258
7304
|
updatedAt?: SortOrder
|
|
7259
7305
|
idx?: SortOrder
|
|
7306
|
+
secret?: SortOrder
|
|
7307
|
+
clientSecrets?: SortOrder
|
|
7260
7308
|
rounds?: SortOrder
|
|
7261
7309
|
results?: SortOrder
|
|
7262
7310
|
matchId?: SortOrder
|
|
@@ -7279,6 +7327,7 @@ export namespace Prisma {
|
|
|
7279
7327
|
createdAt?: SortOrder
|
|
7280
7328
|
updatedAt?: SortOrder
|
|
7281
7329
|
idx?: SortOrder
|
|
7330
|
+
secret?: SortOrder
|
|
7282
7331
|
matchId?: SortOrder
|
|
7283
7332
|
trucoWinnerIdx?: SortOrder
|
|
7284
7333
|
envidoWinnerIdx?: SortOrder
|
|
@@ -7290,6 +7339,7 @@ export namespace Prisma {
|
|
|
7290
7339
|
createdAt?: SortOrder
|
|
7291
7340
|
updatedAt?: SortOrder
|
|
7292
7341
|
idx?: SortOrder
|
|
7342
|
+
secret?: SortOrder
|
|
7293
7343
|
matchId?: SortOrder
|
|
7294
7344
|
trucoWinnerIdx?: SortOrder
|
|
7295
7345
|
envidoWinnerIdx?: SortOrder
|
|
@@ -7534,12 +7584,21 @@ export namespace Prisma {
|
|
|
7534
7584
|
update?: XOR<MatchUpdateWithoutBetInput, MatchUncheckedUpdateWithoutBetInput>
|
|
7535
7585
|
}
|
|
7536
7586
|
|
|
7587
|
+
export type MatchHandCreateclientSecretsInput = {
|
|
7588
|
+
set: Enumerable<string>
|
|
7589
|
+
}
|
|
7590
|
+
|
|
7537
7591
|
export type MatchCreateNestedOneWithoutHandsInput = {
|
|
7538
7592
|
create?: XOR<MatchCreateWithoutHandsInput, MatchUncheckedCreateWithoutHandsInput>
|
|
7539
7593
|
connectOrCreate?: MatchCreateOrConnectWithoutHandsInput
|
|
7540
7594
|
connect?: MatchWhereUniqueInput
|
|
7541
7595
|
}
|
|
7542
7596
|
|
|
7597
|
+
export type MatchHandUpdateclientSecretsInput = {
|
|
7598
|
+
set?: Enumerable<string>
|
|
7599
|
+
push?: string | Enumerable<string>
|
|
7600
|
+
}
|
|
7601
|
+
|
|
7543
7602
|
export type MatchUpdateOneRequiredWithoutHandsNestedInput = {
|
|
7544
7603
|
create?: XOR<MatchCreateWithoutHandsInput, MatchUncheckedCreateWithoutHandsInput>
|
|
7545
7604
|
connectOrCreate?: MatchCreateOrConnectWithoutHandsInput
|
|
@@ -7787,6 +7846,8 @@ export namespace Prisma {
|
|
|
7787
7846
|
createdAt?: Date | string
|
|
7788
7847
|
updatedAt?: Date | string
|
|
7789
7848
|
idx: number
|
|
7849
|
+
secret?: string
|
|
7850
|
+
clientSecrets?: MatchHandCreateclientSecretsInput | Enumerable<string>
|
|
7790
7851
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
7791
7852
|
results?: JsonNullValueInput | InputJsonValue
|
|
7792
7853
|
trucoWinnerIdx?: number | null
|
|
@@ -7799,6 +7860,8 @@ export namespace Prisma {
|
|
|
7799
7860
|
createdAt?: Date | string
|
|
7800
7861
|
updatedAt?: Date | string
|
|
7801
7862
|
idx: number
|
|
7863
|
+
secret?: string
|
|
7864
|
+
clientSecrets?: MatchHandCreateclientSecretsInput | Enumerable<string>
|
|
7802
7865
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
7803
7866
|
results?: JsonNullValueInput | InputJsonValue
|
|
7804
7867
|
trucoWinnerIdx?: number | null
|
|
@@ -7896,6 +7959,8 @@ export namespace Prisma {
|
|
|
7896
7959
|
createdAt?: DateTimeFilter | Date | string
|
|
7897
7960
|
updatedAt?: DateTimeFilter | Date | string
|
|
7898
7961
|
idx?: IntFilter | number
|
|
7962
|
+
secret?: StringFilter | string
|
|
7963
|
+
clientSecrets?: StringNullableListFilter
|
|
7899
7964
|
rounds?: JsonFilter
|
|
7900
7965
|
results?: JsonFilter
|
|
7901
7966
|
matchId?: IntFilter | number
|
|
@@ -8137,6 +8202,8 @@ export namespace Prisma {
|
|
|
8137
8202
|
createdAt?: Date | string
|
|
8138
8203
|
updatedAt?: Date | string
|
|
8139
8204
|
idx: number
|
|
8205
|
+
secret?: string
|
|
8206
|
+
clientSecrets?: MatchHandCreateclientSecretsInput | Enumerable<string>
|
|
8140
8207
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
8141
8208
|
results?: JsonNullValueInput | InputJsonValue
|
|
8142
8209
|
trucoWinnerIdx?: number | null
|
|
@@ -8189,6 +8256,8 @@ export namespace Prisma {
|
|
|
8189
8256
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
8190
8257
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
8191
8258
|
idx?: IntFieldUpdateOperationsInput | number
|
|
8259
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
8260
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
8192
8261
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
8193
8262
|
results?: JsonNullValueInput | InputJsonValue
|
|
8194
8263
|
trucoWinnerIdx?: NullableIntFieldUpdateOperationsInput | number | null
|
|
@@ -8201,6 +8270,8 @@ export namespace Prisma {
|
|
|
8201
8270
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
8202
8271
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
8203
8272
|
idx?: IntFieldUpdateOperationsInput | number
|
|
8273
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
8274
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
8204
8275
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
8205
8276
|
results?: JsonNullValueInput | InputJsonValue
|
|
8206
8277
|
trucoWinnerIdx?: NullableIntFieldUpdateOperationsInput | number | null
|
|
@@ -8213,6 +8284,8 @@ export namespace Prisma {
|
|
|
8213
8284
|
createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
8214
8285
|
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
|
|
8215
8286
|
idx?: IntFieldUpdateOperationsInput | number
|
|
8287
|
+
secret?: StringFieldUpdateOperationsInput | string
|
|
8288
|
+
clientSecrets?: MatchHandUpdateclientSecretsInput | Enumerable<string>
|
|
8216
8289
|
rounds?: JsonNullValueInput | InputJsonValue
|
|
8217
8290
|
results?: JsonNullValueInput | InputJsonValue
|
|
8218
8291
|
trucoWinnerIdx?: NullableIntFieldUpdateOperationsInput | number | null
|
package/prisma/client/index.js
CHANGED
|
@@ -100,6 +100,8 @@ exports.Prisma.MatchHandScalarFieldEnum = {
|
|
|
100
100
|
createdAt: 'createdAt',
|
|
101
101
|
updatedAt: 'updatedAt',
|
|
102
102
|
idx: 'idx',
|
|
103
|
+
secret: 'secret',
|
|
104
|
+
clientSecrets: 'clientSecrets',
|
|
103
105
|
rounds: 'rounds',
|
|
104
106
|
results: 'results',
|
|
105
107
|
matchId: 'matchId',
|
|
@@ -222,7 +224,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
|
|
|
222
224
|
config.isBundled = true
|
|
223
225
|
}
|
|
224
226
|
|
|
225
|
-
config.runtimeDataModel = JSON.parse("{\"models\":{\"UserStats\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"win\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loss\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsBet\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsWon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"state\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"EMatchState\",\"default\":\"UNREADY\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ownerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"results\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"[{\\\"buenas\\\": 0,\\\"malas\\\": 0 },{ \\\"buenas\\\": 0,\\\"malas\\\": 0 }]\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"hands\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchHand\",\"relationName\":\"MatchToMatchHand\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bet\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchBet\",\"relationName\":\"MatchToMatchBet\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchBet\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"relationName\":\"MatchToMatchBet\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsPerPlayer\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allPlayersPaid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerAwarded\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchHand\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"idx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rounds\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"[[]]\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"results\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"[0, 0]\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"relationName\":\"MatchToMatchHand\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trucoWinnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"envidoWinnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"florWinnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"idx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"Satoshi\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsPaid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsReceived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payRequestId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"EMatchState\":{\"values\":[{\"name\":\"UNREADY\",\"dbName\":null},{\"name\":\"READY\",\"dbName\":null},{\"name\":\"STARTED\",\"dbName\":null},{\"name\":\"FINISHED\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}")
|
|
227
|
+
config.runtimeDataModel = JSON.parse("{\"models\":{\"UserStats\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"win\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loss\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsBet\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsWon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsLost\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Match\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"sessionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"state\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"EMatchState\",\"default\":\"UNREADY\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ownerAccountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"results\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"[{\\\"buenas\\\": 0,\\\"malas\\\": 0 },{ \\\"buenas\\\": 0,\\\"malas\\\": 0 }]\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"players\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchPlayer\",\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"hands\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchHand\",\"relationName\":\"MatchToMatchHand\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bet\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MatchBet\",\"relationName\":\"MatchToMatchBet\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchBet\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"relationName\":\"MatchToMatchBet\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsPerPlayer\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allPlayersPaid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"winnerAwarded\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Boolean\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchHand\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"idx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"secret\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"clientSecrets\",\"kind\":\"scalar\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rounds\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"[[]]\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"results\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Json\",\"default\":\"[0, 0]\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"relationName\":\"MatchToMatchHand\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"trucoWinnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"envidoWinnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"florWinnerIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"MatchPlayer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"idx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"Satoshi\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"session\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"teamIdx\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsPaid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"satsReceived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payRequestId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"matchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"match\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Match\",\"relationName\":\"MatchToMatchPlayer\",\"relationFromFields\":[\"matchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"EMatchState\":{\"values\":[{\"name\":\"UNREADY\",\"dbName\":null},{\"name\":\"READY\",\"dbName\":null},{\"name\":\"STARTED\",\"dbName\":null},{\"name\":\"FINISHED\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}")
|
|
226
228
|
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
|
227
229
|
|
|
228
230
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Added the required column `updatedAt` to the `Match` table without a default value. This is not possible if the table is not empty.
|
|
5
|
+
- Added the required column `updatedAt` to the `MatchBet` table without a default value. This is not possible if the table is not empty.
|
|
6
|
+
- Added the required column `secret` to the `MatchHand` table without a default value. This is not possible if the table is not empty.
|
|
7
|
+
- Added the required column `updatedAt` to the `MatchHand` table without a default value. This is not possible if the table is not empty.
|
|
8
|
+
- Added the required column `updatedAt` to the `MatchPlayer` table without a default value. This is not possible if the table is not empty.
|
|
9
|
+
|
|
10
|
+
*/
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "Match" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
13
|
+
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL,
|
|
14
|
+
ADD COLUMN "winnerIdx" INTEGER;
|
|
15
|
+
|
|
16
|
+
-- AlterTable
|
|
17
|
+
ALTER TABLE "MatchBet" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
18
|
+
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
|
19
|
+
|
|
20
|
+
-- AlterTable
|
|
21
|
+
ALTER TABLE "MatchHand" ADD COLUMN "clientSecrets" TEXT[],
|
|
22
|
+
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
23
|
+
ADD COLUMN "secret" TEXT NOT NULL,
|
|
24
|
+
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
|
25
|
+
|
|
26
|
+
-- AlterTable
|
|
27
|
+
ALTER TABLE "MatchPlayer" ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
28
|
+
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
package/prisma/schema.prisma
CHANGED