@opprs/db-prisma 2.5.0 → 2.6.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/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _prisma_client_runtime_library from '@prisma/client/runtime/library';
|
|
2
2
|
import * as _prisma_client from '@prisma/client';
|
|
3
|
-
import { PrismaClient, Player, Prisma, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, EventBoosterType, Tournament, Round, Match, MatchResult, Entry, Standing, User, ApiKey, Location, PostStatus, BlogPost, BlogTag } from '@prisma/client';
|
|
4
|
-
export { Entry, EventBoosterType, Location, Match, MatchResult, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, Player, Prisma, Role, Round, Standing, Tournament, User } from '@prisma/client';
|
|
3
|
+
import { PrismaClient, Player, Prisma, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, EventBoosterType, TournamentFormatType, Tournament, Round, Match, MatchResult, Entry, Standing, User, ApiKey, Location, PostStatus, BlogPost, BlogTag } from '@prisma/client';
|
|
4
|
+
export { Entry, EventBoosterType, Location, Match, MatchResult, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, Player, Prisma, Role, Round, Standing, Tournament, TournamentFormatType, User } from '@prisma/client';
|
|
5
5
|
|
|
6
6
|
declare const prisma: PrismaClient<_prisma_client.Prisma.PrismaClientOptions, never, _prisma_client_runtime_library.DefaultArgs>;
|
|
7
7
|
/**
|
|
@@ -95,12 +95,14 @@ declare function getPlayerWithResults(id: string): Promise<{
|
|
|
95
95
|
createdAt: Date;
|
|
96
96
|
updatedAt: Date;
|
|
97
97
|
externalId: string | null;
|
|
98
|
+
externalUrl: string | null;
|
|
98
99
|
description: string | null;
|
|
99
100
|
date: Date;
|
|
100
101
|
locationId: string | null;
|
|
101
102
|
organizerId: string | null;
|
|
102
103
|
tgpConfig: Prisma.JsonValue | null;
|
|
103
104
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
105
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
104
106
|
allowsOptOut: boolean;
|
|
105
107
|
baseValue: number | null;
|
|
106
108
|
tvaRating: number | null;
|
|
@@ -134,12 +136,14 @@ declare function getPlayerWithResults(id: string): Promise<{
|
|
|
134
136
|
createdAt: Date;
|
|
135
137
|
updatedAt: Date;
|
|
136
138
|
externalId: string | null;
|
|
139
|
+
externalUrl: string | null;
|
|
137
140
|
description: string | null;
|
|
138
141
|
date: Date;
|
|
139
142
|
locationId: string | null;
|
|
140
143
|
organizerId: string | null;
|
|
141
144
|
tgpConfig: Prisma.JsonValue | null;
|
|
142
145
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
146
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
143
147
|
allowsOptOut: boolean;
|
|
144
148
|
baseValue: number | null;
|
|
145
149
|
tvaRating: number | null;
|
|
@@ -320,6 +324,7 @@ declare function isValidPlayerNumber(playerNumber: number): boolean;
|
|
|
320
324
|
*/
|
|
321
325
|
interface CreateTournamentInput {
|
|
322
326
|
externalId?: string;
|
|
327
|
+
externalUrl?: string;
|
|
323
328
|
name: string;
|
|
324
329
|
description?: string;
|
|
325
330
|
date: Date;
|
|
@@ -327,6 +332,7 @@ interface CreateTournamentInput {
|
|
|
327
332
|
organizerId?: string;
|
|
328
333
|
tgpConfig?: Prisma.InputJsonValue;
|
|
329
334
|
eventBooster?: EventBoosterType;
|
|
335
|
+
qualifyingFormat?: TournamentFormatType;
|
|
330
336
|
allowsOptOut?: boolean;
|
|
331
337
|
baseValue?: number;
|
|
332
338
|
tvaRating?: number;
|
|
@@ -340,6 +346,7 @@ interface CreateTournamentInput {
|
|
|
340
346
|
* Input for updating a tournament
|
|
341
347
|
*/
|
|
342
348
|
interface UpdateTournamentInput {
|
|
349
|
+
externalUrl?: string | null;
|
|
343
350
|
name?: string;
|
|
344
351
|
description?: string | null;
|
|
345
352
|
date?: Date;
|
|
@@ -347,6 +354,7 @@ interface UpdateTournamentInput {
|
|
|
347
354
|
organizerId?: string | null;
|
|
348
355
|
tgpConfig?: Prisma.InputJsonValue;
|
|
349
356
|
eventBooster?: EventBoosterType;
|
|
357
|
+
qualifyingFormat?: TournamentFormatType;
|
|
350
358
|
allowsOptOut?: boolean;
|
|
351
359
|
baseValue?: number;
|
|
352
360
|
tvaRating?: number;
|
|
@@ -448,12 +456,14 @@ declare function getTournamentWithResults(id: string): Promise<({
|
|
|
448
456
|
createdAt: Date;
|
|
449
457
|
updatedAt: Date;
|
|
450
458
|
externalId: string | null;
|
|
459
|
+
externalUrl: string | null;
|
|
451
460
|
description: string | null;
|
|
452
461
|
date: Date;
|
|
453
462
|
locationId: string | null;
|
|
454
463
|
organizerId: string | null;
|
|
455
464
|
tgpConfig: Prisma.JsonValue | null;
|
|
456
465
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
466
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
457
467
|
allowsOptOut: boolean;
|
|
458
468
|
baseValue: number | null;
|
|
459
469
|
tvaRating: number | null;
|
|
@@ -513,12 +523,14 @@ declare function getTournamentWithMatches(id: string): Promise<({
|
|
|
513
523
|
createdAt: Date;
|
|
514
524
|
updatedAt: Date;
|
|
515
525
|
externalId: string | null;
|
|
526
|
+
externalUrl: string | null;
|
|
516
527
|
description: string | null;
|
|
517
528
|
date: Date;
|
|
518
529
|
locationId: string | null;
|
|
519
530
|
organizerId: string | null;
|
|
520
531
|
tgpConfig: Prisma.JsonValue | null;
|
|
521
532
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
533
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
522
534
|
allowsOptOut: boolean;
|
|
523
535
|
baseValue: number | null;
|
|
524
536
|
tvaRating: number | null;
|
|
@@ -571,12 +583,14 @@ declare function getTournamentStats(id: string): Promise<{
|
|
|
571
583
|
createdAt: Date;
|
|
572
584
|
updatedAt: Date;
|
|
573
585
|
externalId: string | null;
|
|
586
|
+
externalUrl: string | null;
|
|
574
587
|
description: string | null;
|
|
575
588
|
date: Date;
|
|
576
589
|
locationId: string | null;
|
|
577
590
|
organizerId: string | null;
|
|
578
591
|
tgpConfig: Prisma.JsonValue | null;
|
|
579
592
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
593
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
580
594
|
allowsOptOut: boolean;
|
|
581
595
|
baseValue: number | null;
|
|
582
596
|
tvaRating: number | null;
|
|
@@ -1324,12 +1338,14 @@ declare function getLocationWithTournaments(id: string): Promise<({
|
|
|
1324
1338
|
createdAt: Date;
|
|
1325
1339
|
updatedAt: Date;
|
|
1326
1340
|
externalId: string | null;
|
|
1341
|
+
externalUrl: string | null;
|
|
1327
1342
|
description: string | null;
|
|
1328
1343
|
date: Date;
|
|
1329
1344
|
locationId: string | null;
|
|
1330
1345
|
organizerId: string | null;
|
|
1331
1346
|
tgpConfig: Prisma.JsonValue | null;
|
|
1332
1347
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
1348
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
1333
1349
|
allowsOptOut: boolean;
|
|
1334
1350
|
baseValue: number | null;
|
|
1335
1351
|
tvaRating: number | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _prisma_client_runtime_library from '@prisma/client/runtime/library';
|
|
2
2
|
import * as _prisma_client from '@prisma/client';
|
|
3
|
-
import { PrismaClient, Player, Prisma, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, EventBoosterType, Tournament, Round, Match, MatchResult, Entry, Standing, User, ApiKey, Location, PostStatus, BlogPost, BlogTag } from '@prisma/client';
|
|
4
|
-
export { Entry, EventBoosterType, Location, Match, MatchResult, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, Player, Prisma, Role, Round, Standing, Tournament, User } from '@prisma/client';
|
|
3
|
+
import { PrismaClient, Player, Prisma, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, EventBoosterType, TournamentFormatType, Tournament, Round, Match, MatchResult, Entry, Standing, User, ApiKey, Location, PostStatus, BlogPost, BlogTag } from '@prisma/client';
|
|
4
|
+
export { Entry, EventBoosterType, Location, Match, MatchResult, OpprPlayerRanking, OpprRankingChangeType, OpprRankingHistory, Player, Prisma, Role, Round, Standing, Tournament, TournamentFormatType, User } from '@prisma/client';
|
|
5
5
|
|
|
6
6
|
declare const prisma: PrismaClient<_prisma_client.Prisma.PrismaClientOptions, never, _prisma_client_runtime_library.DefaultArgs>;
|
|
7
7
|
/**
|
|
@@ -95,12 +95,14 @@ declare function getPlayerWithResults(id: string): Promise<{
|
|
|
95
95
|
createdAt: Date;
|
|
96
96
|
updatedAt: Date;
|
|
97
97
|
externalId: string | null;
|
|
98
|
+
externalUrl: string | null;
|
|
98
99
|
description: string | null;
|
|
99
100
|
date: Date;
|
|
100
101
|
locationId: string | null;
|
|
101
102
|
organizerId: string | null;
|
|
102
103
|
tgpConfig: Prisma.JsonValue | null;
|
|
103
104
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
105
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
104
106
|
allowsOptOut: boolean;
|
|
105
107
|
baseValue: number | null;
|
|
106
108
|
tvaRating: number | null;
|
|
@@ -134,12 +136,14 @@ declare function getPlayerWithResults(id: string): Promise<{
|
|
|
134
136
|
createdAt: Date;
|
|
135
137
|
updatedAt: Date;
|
|
136
138
|
externalId: string | null;
|
|
139
|
+
externalUrl: string | null;
|
|
137
140
|
description: string | null;
|
|
138
141
|
date: Date;
|
|
139
142
|
locationId: string | null;
|
|
140
143
|
organizerId: string | null;
|
|
141
144
|
tgpConfig: Prisma.JsonValue | null;
|
|
142
145
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
146
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
143
147
|
allowsOptOut: boolean;
|
|
144
148
|
baseValue: number | null;
|
|
145
149
|
tvaRating: number | null;
|
|
@@ -320,6 +324,7 @@ declare function isValidPlayerNumber(playerNumber: number): boolean;
|
|
|
320
324
|
*/
|
|
321
325
|
interface CreateTournamentInput {
|
|
322
326
|
externalId?: string;
|
|
327
|
+
externalUrl?: string;
|
|
323
328
|
name: string;
|
|
324
329
|
description?: string;
|
|
325
330
|
date: Date;
|
|
@@ -327,6 +332,7 @@ interface CreateTournamentInput {
|
|
|
327
332
|
organizerId?: string;
|
|
328
333
|
tgpConfig?: Prisma.InputJsonValue;
|
|
329
334
|
eventBooster?: EventBoosterType;
|
|
335
|
+
qualifyingFormat?: TournamentFormatType;
|
|
330
336
|
allowsOptOut?: boolean;
|
|
331
337
|
baseValue?: number;
|
|
332
338
|
tvaRating?: number;
|
|
@@ -340,6 +346,7 @@ interface CreateTournamentInput {
|
|
|
340
346
|
* Input for updating a tournament
|
|
341
347
|
*/
|
|
342
348
|
interface UpdateTournamentInput {
|
|
349
|
+
externalUrl?: string | null;
|
|
343
350
|
name?: string;
|
|
344
351
|
description?: string | null;
|
|
345
352
|
date?: Date;
|
|
@@ -347,6 +354,7 @@ interface UpdateTournamentInput {
|
|
|
347
354
|
organizerId?: string | null;
|
|
348
355
|
tgpConfig?: Prisma.InputJsonValue;
|
|
349
356
|
eventBooster?: EventBoosterType;
|
|
357
|
+
qualifyingFormat?: TournamentFormatType;
|
|
350
358
|
allowsOptOut?: boolean;
|
|
351
359
|
baseValue?: number;
|
|
352
360
|
tvaRating?: number;
|
|
@@ -448,12 +456,14 @@ declare function getTournamentWithResults(id: string): Promise<({
|
|
|
448
456
|
createdAt: Date;
|
|
449
457
|
updatedAt: Date;
|
|
450
458
|
externalId: string | null;
|
|
459
|
+
externalUrl: string | null;
|
|
451
460
|
description: string | null;
|
|
452
461
|
date: Date;
|
|
453
462
|
locationId: string | null;
|
|
454
463
|
organizerId: string | null;
|
|
455
464
|
tgpConfig: Prisma.JsonValue | null;
|
|
456
465
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
466
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
457
467
|
allowsOptOut: boolean;
|
|
458
468
|
baseValue: number | null;
|
|
459
469
|
tvaRating: number | null;
|
|
@@ -513,12 +523,14 @@ declare function getTournamentWithMatches(id: string): Promise<({
|
|
|
513
523
|
createdAt: Date;
|
|
514
524
|
updatedAt: Date;
|
|
515
525
|
externalId: string | null;
|
|
526
|
+
externalUrl: string | null;
|
|
516
527
|
description: string | null;
|
|
517
528
|
date: Date;
|
|
518
529
|
locationId: string | null;
|
|
519
530
|
organizerId: string | null;
|
|
520
531
|
tgpConfig: Prisma.JsonValue | null;
|
|
521
532
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
533
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
522
534
|
allowsOptOut: boolean;
|
|
523
535
|
baseValue: number | null;
|
|
524
536
|
tvaRating: number | null;
|
|
@@ -571,12 +583,14 @@ declare function getTournamentStats(id: string): Promise<{
|
|
|
571
583
|
createdAt: Date;
|
|
572
584
|
updatedAt: Date;
|
|
573
585
|
externalId: string | null;
|
|
586
|
+
externalUrl: string | null;
|
|
574
587
|
description: string | null;
|
|
575
588
|
date: Date;
|
|
576
589
|
locationId: string | null;
|
|
577
590
|
organizerId: string | null;
|
|
578
591
|
tgpConfig: Prisma.JsonValue | null;
|
|
579
592
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
593
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
580
594
|
allowsOptOut: boolean;
|
|
581
595
|
baseValue: number | null;
|
|
582
596
|
tvaRating: number | null;
|
|
@@ -1324,12 +1338,14 @@ declare function getLocationWithTournaments(id: string): Promise<({
|
|
|
1324
1338
|
createdAt: Date;
|
|
1325
1339
|
updatedAt: Date;
|
|
1326
1340
|
externalId: string | null;
|
|
1341
|
+
externalUrl: string | null;
|
|
1327
1342
|
description: string | null;
|
|
1328
1343
|
date: Date;
|
|
1329
1344
|
locationId: string | null;
|
|
1330
1345
|
organizerId: string | null;
|
|
1331
1346
|
tgpConfig: Prisma.JsonValue | null;
|
|
1332
1347
|
eventBooster: _prisma_client.$Enums.EventBoosterType;
|
|
1348
|
+
qualifyingFormat: _prisma_client.$Enums.TournamentFormatType;
|
|
1333
1349
|
allowsOptOut: boolean;
|
|
1334
1350
|
baseValue: number | null;
|
|
1335
1351
|
tvaRating: number | null;
|
package/package.json
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- CreateEnum
|
|
2
|
+
CREATE TYPE "TournamentFormatType" AS ENUM ('SINGLE_ELIMINATION', 'DOUBLE_ELIMINATION', 'MATCH_PLAY', 'BEST_GAME', 'CARD_QUALIFYING', 'PIN_GOLF', 'FLIP_FRENZY', 'STRIKE_FORMAT', 'TARGET_MATCH_PLAY', 'HYBRID', 'NONE');
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "Tournament" ADD COLUMN "qualifyingFormat" "TournamentFormatType" NOT NULL DEFAULT 'NONE';
|
package/prisma/schema.prisma
CHANGED
|
@@ -44,6 +44,7 @@ model Tournament {
|
|
|
44
44
|
|
|
45
45
|
// Tournament identification
|
|
46
46
|
externalId String? @unique // External ID from OPPR or other systems
|
|
47
|
+
externalUrl String? // URL to external tournament page (e.g., IFPA, Matchplay)
|
|
47
48
|
name String
|
|
48
49
|
description String? @db.VarChar(2000)
|
|
49
50
|
date DateTime
|
|
@@ -62,6 +63,7 @@ model Tournament {
|
|
|
62
63
|
|
|
63
64
|
// Event classification
|
|
64
65
|
eventBooster EventBoosterType @default(NONE)
|
|
66
|
+
qualifyingFormat TournamentFormatType @default(NONE)
|
|
65
67
|
allowsOptOut Boolean @default(false)
|
|
66
68
|
|
|
67
69
|
// Tournament value calculations (can be calculated or cached)
|
|
@@ -194,6 +196,21 @@ enum EventBoosterType {
|
|
|
194
196
|
MAJOR
|
|
195
197
|
}
|
|
196
198
|
|
|
199
|
+
// Enum for tournament format types (qualifying and finals)
|
|
200
|
+
enum TournamentFormatType {
|
|
201
|
+
SINGLE_ELIMINATION
|
|
202
|
+
DOUBLE_ELIMINATION
|
|
203
|
+
MATCH_PLAY
|
|
204
|
+
BEST_GAME
|
|
205
|
+
CARD_QUALIFYING
|
|
206
|
+
PIN_GOLF
|
|
207
|
+
FLIP_FRENZY
|
|
208
|
+
STRIKE_FORMAT
|
|
209
|
+
TARGET_MATCH_PLAY
|
|
210
|
+
HYBRID
|
|
211
|
+
NONE
|
|
212
|
+
}
|
|
213
|
+
|
|
197
214
|
// Enum for user roles
|
|
198
215
|
enum Role {
|
|
199
216
|
USER
|