feat(rooms): migrate multiplayer room storage from memory to PostgreSQL
This commit is contained in:
@@ -387,6 +387,7 @@ export const ModelName = {
|
||||
User: 'User',
|
||||
Game: 'Game',
|
||||
DailyPuzzle: 'DailyPuzzle',
|
||||
Room: 'Room',
|
||||
DailyResult: 'DailyResult'
|
||||
} as const
|
||||
|
||||
@@ -403,7 +404,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "user" | "game" | "dailyPuzzle" | "dailyResult"
|
||||
modelProps: "user" | "game" | "dailyPuzzle" | "room" | "dailyResult"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -629,6 +630,80 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
Room: {
|
||||
payload: Prisma.$RoomPayload<ExtArgs>
|
||||
fields: Prisma.RoomFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.RoomFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.RoomFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.RoomFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.RoomFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.RoomFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.RoomCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.RoomCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.RoomCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.RoomDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.RoomUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.RoomDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.RoomUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.RoomUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.RoomUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$RoomPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.RoomAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateRoom>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.RoomGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.RoomGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.RoomCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.RoomCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
DailyResult: {
|
||||
payload: Prisma.$DailyResultPayload<ExtArgs>
|
||||
fields: Prisma.DailyResultFieldRefs
|
||||
@@ -780,6 +855,25 @@ export const DailyPuzzleScalarFieldEnum = {
|
||||
export type DailyPuzzleScalarFieldEnum = (typeof DailyPuzzleScalarFieldEnum)[keyof typeof DailyPuzzleScalarFieldEnum]
|
||||
|
||||
|
||||
export const RoomScalarFieldEnum = {
|
||||
code: 'code',
|
||||
players: 'players',
|
||||
phase: 'phase',
|
||||
round: 'round',
|
||||
totalRounds: 'totalRounds',
|
||||
maxPlayers: 'maxPlayers',
|
||||
startArticle: 'startArticle',
|
||||
targetArticle: 'targetArticle',
|
||||
roundWinner: 'roundWinner',
|
||||
countdownStart: 'countdownStart',
|
||||
roundStart: 'roundStart',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type RoomScalarFieldEnum = (typeof RoomScalarFieldEnum)[keyof typeof RoomScalarFieldEnum]
|
||||
|
||||
|
||||
export const DailyResultScalarFieldEnum = {
|
||||
id: 'id',
|
||||
puzzleId: 'puzzleId',
|
||||
@@ -802,6 +896,13 @@ export const SortOrder = {
|
||||
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
||||
|
||||
|
||||
export const JsonNullValueInput = {
|
||||
JsonNull: JsonNull
|
||||
} as const
|
||||
|
||||
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
||||
|
||||
|
||||
export const QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
@@ -810,6 +911,23 @@ export const QueryMode = {
|
||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
||||
|
||||
|
||||
export const JsonNullValueFilter = {
|
||||
DbNull: DbNull,
|
||||
JsonNull: JsonNull,
|
||||
AnyNull: AnyNull
|
||||
} as const
|
||||
|
||||
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Field references
|
||||
@@ -878,6 +996,34 @@ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, '
|
||||
export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'Json'
|
||||
*/
|
||||
export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'QueryMode'
|
||||
*/
|
||||
export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'BigInt'
|
||||
*/
|
||||
export type BigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'BigInt[]'
|
||||
*/
|
||||
export type ListBigIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BigInt[]'>
|
||||
|
||||
|
||||
/**
|
||||
* Batch Payload for updateMany & deleteMany & createMany
|
||||
*/
|
||||
@@ -976,6 +1122,7 @@ export type GlobalOmitConfig = {
|
||||
user?: Prisma.UserOmit
|
||||
game?: Prisma.GameOmit
|
||||
dailyPuzzle?: Prisma.DailyPuzzleOmit
|
||||
room?: Prisma.RoomOmit
|
||||
dailyResult?: Prisma.DailyResultOmit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user