Merge pull request #6 from shumaiOne/feat/agent-session-one-to-one

feat(db): migrate AgentSession and AssetComment to 1:1 relation
This commit is contained in:
Yiling-J
2026-05-21 16:27:35 +08:00
committed by GitHub
5 changed files with 126 additions and 176 deletions
@@ -0,0 +1,8 @@
/*
Warnings:
- A unique constraint covering the columns `[session_id]` on the table `asset_comments` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "asset_comments_session_id_key" ON "asset_comments"("session_id");
+2 -2
View File
@@ -429,7 +429,7 @@ model AssetComment {
/// [AnnotationList]
annotation Json?
second Float?
sessionId String? @map("session_id")
sessionId String? @unique @map("session_id")
session AgentSession? @relation(fields: [sessionId], references: [id], onDelete: SetNull)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@ -653,7 +653,7 @@ model AgentSession {
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
entries AgentSessionEntry[]
comments AssetComment[]
comment AssetComment?
@@map("agent_sessions")
}
File diff suppressed because one or more lines are too long
+44 -58
View File
@@ -203,7 +203,7 @@ export type AgentSessionWhereInput = {
agent?: Prisma.XOR<Prisma.AgentScalarRelationFilter, Prisma.AgentWhereInput>
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
entries?: Prisma.AgentSessionEntryListRelationFilter
comments?: Prisma.AssetCommentListRelationFilter
comment?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
}
export type AgentSessionOrderByWithRelationInput = {
@@ -217,7 +217,7 @@ export type AgentSessionOrderByWithRelationInput = {
agent?: Prisma.AgentOrderByWithRelationInput
user?: Prisma.UserOrderByWithRelationInput
entries?: Prisma.AgentSessionEntryOrderByRelationAggregateInput
comments?: Prisma.AssetCommentOrderByRelationAggregateInput
comment?: Prisma.AssetCommentOrderByWithRelationInput
}
export type AgentSessionWhereUniqueInput = Prisma.AtLeast<{
@@ -234,7 +234,7 @@ export type AgentSessionWhereUniqueInput = Prisma.AtLeast<{
agent?: Prisma.XOR<Prisma.AgentScalarRelationFilter, Prisma.AgentWhereInput>
user?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null
entries?: Prisma.AgentSessionEntryListRelationFilter
comments?: Prisma.AssetCommentListRelationFilter
comment?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
}, "id">
export type AgentSessionOrderByWithAggregationInput = {
@@ -272,7 +272,7 @@ export type AgentSessionCreateInput = {
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
comments?: Prisma.AssetCommentCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
}
export type AgentSessionUncheckedCreateInput = {
@@ -284,7 +284,7 @@ export type AgentSessionUncheckedCreateInput = {
createdAt?: Date | string
updatedAt?: Date | string
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
}
export type AgentSessionUpdateInput = {
@@ -296,7 +296,7 @@ export type AgentSessionUpdateInput = {
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
comments?: Prisma.AssetCommentUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateInput = {
@@ -308,7 +308,7 @@ export type AgentSessionUncheckedUpdateInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
}
export type AgentSessionCreateManyInput = {
@@ -431,20 +431,20 @@ export type AgentSessionUncheckedUpdateManyWithoutUserNestedInput = {
deleteMany?: Prisma.AgentSessionScalarWhereInput | Prisma.AgentSessionScalarWhereInput[]
}
export type AgentSessionCreateNestedOneWithoutCommentsInput = {
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentsInput, Prisma.AgentSessionUncheckedCreateWithoutCommentsInput>
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutCommentsInput
export type AgentSessionCreateNestedOneWithoutCommentInput = {
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutCommentInput
connect?: Prisma.AgentSessionWhereUniqueInput
}
export type AgentSessionUpdateOneWithoutCommentsNestedInput = {
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentsInput, Prisma.AgentSessionUncheckedCreateWithoutCommentsInput>
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutCommentsInput
upsert?: Prisma.AgentSessionUpsertWithoutCommentsInput
export type AgentSessionUpdateOneWithoutCommentNestedInput = {
create?: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
connectOrCreate?: Prisma.AgentSessionCreateOrConnectWithoutCommentInput
upsert?: Prisma.AgentSessionUpsertWithoutCommentInput
disconnect?: Prisma.AgentSessionWhereInput | boolean
delete?: Prisma.AgentSessionWhereInput | boolean
connect?: Prisma.AgentSessionWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.AgentSessionUpdateToOneWithWhereWithoutCommentsInput, Prisma.AgentSessionUpdateWithoutCommentsInput>, Prisma.AgentSessionUncheckedUpdateWithoutCommentsInput>
update?: Prisma.XOR<Prisma.XOR<Prisma.AgentSessionUpdateToOneWithWhereWithoutCommentInput, Prisma.AgentSessionUpdateWithoutCommentInput>, Prisma.AgentSessionUncheckedUpdateWithoutCommentInput>
}
export type AgentSessionCreateNestedManyWithoutAgentInput = {
@@ -511,7 +511,7 @@ export type AgentSessionCreateWithoutUserInput = {
updatedAt?: Date | string
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
comments?: Prisma.AssetCommentCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
}
export type AgentSessionUncheckedCreateWithoutUserInput = {
@@ -522,7 +522,7 @@ export type AgentSessionUncheckedCreateWithoutUserInput = {
createdAt?: Date | string
updatedAt?: Date | string
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
}
export type AgentSessionCreateOrConnectWithoutUserInput = {
@@ -564,7 +564,7 @@ export type AgentSessionScalarWhereInput = {
updatedAt?: Prisma.DateTimeFilter<"AgentSession"> | Date | string
}
export type AgentSessionCreateWithoutCommentsInput = {
export type AgentSessionCreateWithoutCommentInput = {
id?: string
cwd: string
leafId?: string | null
@@ -575,7 +575,7 @@ export type AgentSessionCreateWithoutCommentsInput = {
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
}
export type AgentSessionUncheckedCreateWithoutCommentsInput = {
export type AgentSessionUncheckedCreateWithoutCommentInput = {
id?: string
agentId: string
userId?: string | null
@@ -586,23 +586,23 @@ export type AgentSessionUncheckedCreateWithoutCommentsInput = {
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
}
export type AgentSessionCreateOrConnectWithoutCommentsInput = {
export type AgentSessionCreateOrConnectWithoutCommentInput = {
where: Prisma.AgentSessionWhereUniqueInput
create: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentsInput, Prisma.AgentSessionUncheckedCreateWithoutCommentsInput>
create: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
}
export type AgentSessionUpsertWithoutCommentsInput = {
update: Prisma.XOR<Prisma.AgentSessionUpdateWithoutCommentsInput, Prisma.AgentSessionUncheckedUpdateWithoutCommentsInput>
create: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentsInput, Prisma.AgentSessionUncheckedCreateWithoutCommentsInput>
export type AgentSessionUpsertWithoutCommentInput = {
update: Prisma.XOR<Prisma.AgentSessionUpdateWithoutCommentInput, Prisma.AgentSessionUncheckedUpdateWithoutCommentInput>
create: Prisma.XOR<Prisma.AgentSessionCreateWithoutCommentInput, Prisma.AgentSessionUncheckedCreateWithoutCommentInput>
where?: Prisma.AgentSessionWhereInput
}
export type AgentSessionUpdateToOneWithWhereWithoutCommentsInput = {
export type AgentSessionUpdateToOneWithWhereWithoutCommentInput = {
where?: Prisma.AgentSessionWhereInput
data: Prisma.XOR<Prisma.AgentSessionUpdateWithoutCommentsInput, Prisma.AgentSessionUncheckedUpdateWithoutCommentsInput>
data: Prisma.XOR<Prisma.AgentSessionUpdateWithoutCommentInput, Prisma.AgentSessionUncheckedUpdateWithoutCommentInput>
}
export type AgentSessionUpdateWithoutCommentsInput = {
export type AgentSessionUpdateWithoutCommentInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
cwd?: Prisma.StringFieldUpdateOperationsInput | string
leafId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
@@ -613,7 +613,7 @@ export type AgentSessionUpdateWithoutCommentsInput = {
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateWithoutCommentsInput = {
export type AgentSessionUncheckedUpdateWithoutCommentInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
agentId?: Prisma.StringFieldUpdateOperationsInput | string
userId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
@@ -632,7 +632,7 @@ export type AgentSessionCreateWithoutAgentInput = {
updatedAt?: Date | string
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
entries?: Prisma.AgentSessionEntryCreateNestedManyWithoutSessionInput
comments?: Prisma.AssetCommentCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
}
export type AgentSessionUncheckedCreateWithoutAgentInput = {
@@ -643,7 +643,7 @@ export type AgentSessionUncheckedCreateWithoutAgentInput = {
createdAt?: Date | string
updatedAt?: Date | string
entries?: Prisma.AgentSessionEntryUncheckedCreateNestedManyWithoutSessionInput
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
}
export type AgentSessionCreateOrConnectWithoutAgentInput = {
@@ -680,7 +680,7 @@ export type AgentSessionCreateWithoutEntriesInput = {
updatedAt?: Date | string
agent: Prisma.AgentCreateNestedOneWithoutAgentSessionsInput
user?: Prisma.UserCreateNestedOneWithoutAgentSessionsInput
comments?: Prisma.AssetCommentCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentCreateNestedOneWithoutSessionInput
}
export type AgentSessionUncheckedCreateWithoutEntriesInput = {
@@ -691,7 +691,7 @@ export type AgentSessionUncheckedCreateWithoutEntriesInput = {
leafId?: string | null
createdAt?: Date | string
updatedAt?: Date | string
comments?: Prisma.AssetCommentUncheckedCreateNestedManyWithoutSessionInput
comment?: Prisma.AssetCommentUncheckedCreateNestedOneWithoutSessionInput
}
export type AgentSessionCreateOrConnectWithoutEntriesInput = {
@@ -718,7 +718,7 @@ export type AgentSessionUpdateWithoutEntriesInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
comments?: Prisma.AssetCommentUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateWithoutEntriesInput = {
@@ -729,7 +729,7 @@ export type AgentSessionUncheckedUpdateWithoutEntriesInput = {
leafId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
}
export type AgentSessionCreateManyUserInput = {
@@ -749,7 +749,7 @@ export type AgentSessionUpdateWithoutUserInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
agent?: Prisma.AgentUpdateOneRequiredWithoutAgentSessionsNestedInput
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
comments?: Prisma.AssetCommentUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateWithoutUserInput = {
@@ -760,7 +760,7 @@ export type AgentSessionUncheckedUpdateWithoutUserInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateManyWithoutUserInput = {
@@ -789,7 +789,7 @@ export type AgentSessionUpdateWithoutAgentInput = {
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
user?: Prisma.UserUpdateOneWithoutAgentSessionsNestedInput
entries?: Prisma.AgentSessionEntryUpdateManyWithoutSessionNestedInput
comments?: Prisma.AssetCommentUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUpdateOneWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateWithoutAgentInput = {
@@ -800,7 +800,7 @@ export type AgentSessionUncheckedUpdateWithoutAgentInput = {
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
entries?: Prisma.AgentSessionEntryUncheckedUpdateManyWithoutSessionNestedInput
comments?: Prisma.AssetCommentUncheckedUpdateManyWithoutSessionNestedInput
comment?: Prisma.AssetCommentUncheckedUpdateOneWithoutSessionNestedInput
}
export type AgentSessionUncheckedUpdateManyWithoutAgentInput = {
@@ -819,12 +819,10 @@ export type AgentSessionUncheckedUpdateManyWithoutAgentInput = {
export type AgentSessionCountOutputType = {
entries: number
comments: number
}
export type AgentSessionCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
entries?: boolean | AgentSessionCountOutputTypeCountEntriesArgs
comments?: boolean | AgentSessionCountOutputTypeCountCommentsArgs
}
/**
@@ -844,13 +842,6 @@ export type AgentSessionCountOutputTypeCountEntriesArgs<ExtArgs extends runtime.
where?: Prisma.AgentSessionEntryWhereInput
}
/**
* AgentSessionCountOutputType without action
*/
export type AgentSessionCountOutputTypeCountCommentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.AssetCommentWhereInput
}
export type AgentSessionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
@@ -863,7 +854,7 @@ export type AgentSessionSelect<ExtArgs extends runtime.Types.Extensions.Internal
agent?: boolean | Prisma.AgentDefaultArgs<ExtArgs>
user?: boolean | Prisma.AgentSession$userArgs<ExtArgs>
entries?: boolean | Prisma.AgentSession$entriesArgs<ExtArgs>
comments?: boolean | Prisma.AgentSession$commentsArgs<ExtArgs>
comment?: boolean | Prisma.AgentSession$commentArgs<ExtArgs>
_count?: boolean | Prisma.AgentSessionCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["agentSession"]>
@@ -906,7 +897,7 @@ export type AgentSessionInclude<ExtArgs extends runtime.Types.Extensions.Interna
agent?: boolean | Prisma.AgentDefaultArgs<ExtArgs>
user?: boolean | Prisma.AgentSession$userArgs<ExtArgs>
entries?: boolean | Prisma.AgentSession$entriesArgs<ExtArgs>
comments?: boolean | Prisma.AgentSession$commentsArgs<ExtArgs>
comment?: boolean | Prisma.AgentSession$commentArgs<ExtArgs>
_count?: boolean | Prisma.AgentSessionCountOutputTypeDefaultArgs<ExtArgs>
}
export type AgentSessionIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -924,7 +915,7 @@ export type $AgentSessionPayload<ExtArgs extends runtime.Types.Extensions.Intern
agent: Prisma.$AgentPayload<ExtArgs>
user: Prisma.$UserPayload<ExtArgs> | null
entries: Prisma.$AgentSessionEntryPayload<ExtArgs>[]
comments: Prisma.$AssetCommentPayload<ExtArgs>[]
comment: Prisma.$AssetCommentPayload<ExtArgs> | null
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: string
@@ -1331,7 +1322,7 @@ export interface Prisma__AgentSessionClient<T, Null = never, ExtArgs extends run
agent<T extends Prisma.AgentDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentDefaultArgs<ExtArgs>>): Prisma.Prisma__AgentClient<runtime.Types.Result.GetResult<Prisma.$AgentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
user<T extends Prisma.AgentSession$userArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$userArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
entries<T extends Prisma.AgentSession$entriesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$entriesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AgentSessionEntryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
comments<T extends Prisma.AgentSession$commentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$commentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AssetCommentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
comment<T extends Prisma.AgentSession$commentArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AgentSession$commentArgs<ExtArgs>>): Prisma.Prisma__AssetCommentClient<runtime.Types.Result.GetResult<Prisma.$AssetCommentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1812,9 +1803,9 @@ export type AgentSession$entriesArgs<ExtArgs extends runtime.Types.Extensions.In
}
/**
* AgentSession.comments
* AgentSession.comment
*/
export type AgentSession$commentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
export type AgentSession$commentArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AssetComment
*/
@@ -1828,11 +1819,6 @@ export type AgentSession$commentsArgs<ExtArgs extends runtime.Types.Extensions.I
*/
include?: Prisma.AssetCommentInclude<ExtArgs> | null
where?: Prisma.AssetCommentWhereInput
orderBy?: Prisma.AssetCommentOrderByWithRelationInput | Prisma.AssetCommentOrderByWithRelationInput[]
cursor?: Prisma.AssetCommentWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.AssetCommentScalarFieldEnum | Prisma.AssetCommentScalarFieldEnum[]
}
/**
+68 -112
View File
@@ -283,13 +283,13 @@ export type AssetCommentOrderByWithRelationInput = {
export type AssetCommentWhereUniqueInput = Prisma.AtLeast<{
id?: string
sessionId?: string
AND?: Prisma.AssetCommentWhereInput | Prisma.AssetCommentWhereInput[]
OR?: Prisma.AssetCommentWhereInput[]
NOT?: Prisma.AssetCommentWhereInput | Prisma.AssetCommentWhereInput[]
message?: Prisma.StringNullableFilter<"AssetComment"> | string | null
annotation?: Prisma.JsonNullableFilter<"AssetComment">
second?: Prisma.FloatNullableFilter<"AssetComment"> | number | null
sessionId?: Prisma.StringNullableFilter<"AssetComment"> | string | null
createdAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
updatedAt?: Prisma.DateTimeFilter<"AssetComment"> | Date | string
assetId?: Prisma.StringFilter<"AssetComment"> | string
@@ -301,7 +301,7 @@ export type AssetCommentWhereUniqueInput = Prisma.AtLeast<{
replyTo?: Prisma.XOR<Prisma.AssetCommentNullableScalarRelationFilter, Prisma.AssetCommentWhereInput> | null
replies?: Prisma.AssetCommentListRelationFilter
attachments?: Prisma.AssetCommentAttachmentListRelationFilter
}, "id">
}, "id" | "sessionId">
export type AssetCommentOrderByWithAggregationInput = {
id?: Prisma.SortOrder
@@ -344,7 +344,7 @@ export type AssetCommentCreateInput = {
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentsInput
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
@@ -374,7 +374,7 @@ export type AssetCommentUpdateInput = {
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
session?: Prisma.AgentSessionUpdateOneWithoutCommentsNestedInput
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
@@ -653,46 +653,36 @@ export type AssetCommentUpdateOneRequiredWithoutAttachmentsNestedInput = {
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetCommentUpdateToOneWithWhereWithoutAttachmentsInput, Prisma.AssetCommentUpdateWithoutAttachmentsInput>, Prisma.AssetCommentUncheckedUpdateWithoutAttachmentsInput>
}
export type AssetCommentCreateNestedManyWithoutSessionInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput> | Prisma.AssetCommentCreateWithoutSessionInput[] | Prisma.AssetCommentUncheckedCreateWithoutSessionInput[]
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput | Prisma.AssetCommentCreateOrConnectWithoutSessionInput[]
createMany?: Prisma.AssetCommentCreateManySessionInputEnvelope
connect?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
export type AssetCommentCreateNestedOneWithoutSessionInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
connect?: Prisma.AssetCommentWhereUniqueInput
}
export type AssetCommentUncheckedCreateNestedManyWithoutSessionInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput> | Prisma.AssetCommentCreateWithoutSessionInput[] | Prisma.AssetCommentUncheckedCreateWithoutSessionInput[]
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput | Prisma.AssetCommentCreateOrConnectWithoutSessionInput[]
createMany?: Prisma.AssetCommentCreateManySessionInputEnvelope
connect?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
export type AssetCommentUncheckedCreateNestedOneWithoutSessionInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
connect?: Prisma.AssetCommentWhereUniqueInput
}
export type AssetCommentUpdateManyWithoutSessionNestedInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput> | Prisma.AssetCommentCreateWithoutSessionInput[] | Prisma.AssetCommentUncheckedCreateWithoutSessionInput[]
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput | Prisma.AssetCommentCreateOrConnectWithoutSessionInput[]
upsert?: Prisma.AssetCommentUpsertWithWhereUniqueWithoutSessionInput | Prisma.AssetCommentUpsertWithWhereUniqueWithoutSessionInput[]
createMany?: Prisma.AssetCommentCreateManySessionInputEnvelope
set?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
disconnect?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
delete?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
connect?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
update?: Prisma.AssetCommentUpdateWithWhereUniqueWithoutSessionInput | Prisma.AssetCommentUpdateWithWhereUniqueWithoutSessionInput[]
updateMany?: Prisma.AssetCommentUpdateManyWithWhereWithoutSessionInput | Prisma.AssetCommentUpdateManyWithWhereWithoutSessionInput[]
deleteMany?: Prisma.AssetCommentScalarWhereInput | Prisma.AssetCommentScalarWhereInput[]
export type AssetCommentUpdateOneWithoutSessionNestedInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
upsert?: Prisma.AssetCommentUpsertWithoutSessionInput
disconnect?: Prisma.AssetCommentWhereInput | boolean
delete?: Prisma.AssetCommentWhereInput | boolean
connect?: Prisma.AssetCommentWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetCommentUpdateToOneWithWhereWithoutSessionInput, Prisma.AssetCommentUpdateWithoutSessionInput>, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
}
export type AssetCommentUncheckedUpdateManyWithoutSessionNestedInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput> | Prisma.AssetCommentCreateWithoutSessionInput[] | Prisma.AssetCommentUncheckedCreateWithoutSessionInput[]
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput | Prisma.AssetCommentCreateOrConnectWithoutSessionInput[]
upsert?: Prisma.AssetCommentUpsertWithWhereUniqueWithoutSessionInput | Prisma.AssetCommentUpsertWithWhereUniqueWithoutSessionInput[]
createMany?: Prisma.AssetCommentCreateManySessionInputEnvelope
set?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
disconnect?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
delete?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
connect?: Prisma.AssetCommentWhereUniqueInput | Prisma.AssetCommentWhereUniqueInput[]
update?: Prisma.AssetCommentUpdateWithWhereUniqueWithoutSessionInput | Prisma.AssetCommentUpdateWithWhereUniqueWithoutSessionInput[]
updateMany?: Prisma.AssetCommentUpdateManyWithWhereWithoutSessionInput | Prisma.AssetCommentUpdateManyWithWhereWithoutSessionInput[]
deleteMany?: Prisma.AssetCommentScalarWhereInput | Prisma.AssetCommentScalarWhereInput[]
export type AssetCommentUncheckedUpdateOneWithoutSessionNestedInput = {
create?: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
connectOrCreate?: Prisma.AssetCommentCreateOrConnectWithoutSessionInput
upsert?: Prisma.AssetCommentUpsertWithoutSessionInput
disconnect?: Prisma.AssetCommentWhereInput | boolean
delete?: Prisma.AssetCommentWhereInput | boolean
connect?: Prisma.AssetCommentWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.AssetCommentUpdateToOneWithWhereWithoutSessionInput, Prisma.AssetCommentUpdateWithoutSessionInput>, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
}
export type AssetCommentCreateWithoutCreatorInput = {
@@ -702,7 +692,7 @@ export type AssetCommentCreateWithoutCreatorInput = {
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentsInput
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
@@ -772,7 +762,7 @@ export type AssetCommentCreateWithoutAssetInput = {
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentsInput
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
@@ -826,7 +816,7 @@ export type AssetCommentCreateWithoutRepliesInput = {
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentsInput
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
@@ -859,7 +849,7 @@ export type AssetCommentCreateWithoutReplyToInput = {
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentsInput
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
replies?: Prisma.AssetCommentCreateNestedManyWithoutReplyToInput
@@ -908,7 +898,7 @@ export type AssetCommentUpdateWithoutRepliesInput = {
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
session?: Prisma.AgentSessionUpdateOneWithoutCommentsNestedInput
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
@@ -952,7 +942,7 @@ export type AssetCommentCreateWithoutAttachmentsInput = {
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentsInput
session?: Prisma.AgentSessionCreateNestedOneWithoutCommentInput
asset: Prisma.AssetCreateNestedOneWithoutCommentsInput
creator?: Prisma.UserCreateNestedOneWithoutCommentsInput
replyTo?: Prisma.AssetCommentCreateNestedOneWithoutRepliesInput
@@ -996,7 +986,7 @@ export type AssetCommentUpdateWithoutAttachmentsInput = {
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
session?: Prisma.AgentSessionUpdateOneWithoutCommentsNestedInput
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
@@ -1050,25 +1040,43 @@ export type AssetCommentCreateOrConnectWithoutSessionInput = {
create: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
}
export type AssetCommentCreateManySessionInputEnvelope = {
data: Prisma.AssetCommentCreateManySessionInput | Prisma.AssetCommentCreateManySessionInput[]
skipDuplicates?: boolean
}
export type AssetCommentUpsertWithWhereUniqueWithoutSessionInput = {
where: Prisma.AssetCommentWhereUniqueInput
export type AssetCommentUpsertWithoutSessionInput = {
update: Prisma.XOR<Prisma.AssetCommentUpdateWithoutSessionInput, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
create: Prisma.XOR<Prisma.AssetCommentCreateWithoutSessionInput, Prisma.AssetCommentUncheckedCreateWithoutSessionInput>
where?: Prisma.AssetCommentWhereInput
}
export type AssetCommentUpdateWithWhereUniqueWithoutSessionInput = {
where: Prisma.AssetCommentWhereUniqueInput
export type AssetCommentUpdateToOneWithWhereWithoutSessionInput = {
where?: Prisma.AssetCommentWhereInput
data: Prisma.XOR<Prisma.AssetCommentUpdateWithoutSessionInput, Prisma.AssetCommentUncheckedUpdateWithoutSessionInput>
}
export type AssetCommentUpdateManyWithWhereWithoutSessionInput = {
where: Prisma.AssetCommentScalarWhereInput
data: Prisma.XOR<Prisma.AssetCommentUpdateManyMutationInput, Prisma.AssetCommentUncheckedUpdateManyWithoutSessionInput>
export type AssetCommentUpdateWithoutSessionInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
attachments?: Prisma.AssetCommentAttachmentUpdateManyWithoutCommentNestedInput
}
export type AssetCommentUncheckedUpdateWithoutSessionInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assetId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
replyToId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
replies?: Prisma.AssetCommentUncheckedUpdateManyWithoutReplyToNestedInput
attachments?: Prisma.AssetCommentAttachmentUncheckedUpdateManyWithoutCommentNestedInput
}
export type AssetCommentCreateManyCreatorInput = {
@@ -1090,7 +1098,7 @@ export type AssetCommentUpdateWithoutCreatorInput = {
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
session?: Prisma.AgentSessionUpdateOneWithoutCommentsNestedInput
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
@@ -1142,7 +1150,7 @@ export type AssetCommentUpdateWithoutAssetInput = {
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
session?: Prisma.AgentSessionUpdateOneWithoutCommentsNestedInput
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
@@ -1194,7 +1202,7 @@ export type AssetCommentUpdateWithoutReplyToInput = {
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
session?: Prisma.AgentSessionUpdateOneWithoutCommentsNestedInput
session?: Prisma.AgentSessionUpdateOneWithoutCommentNestedInput
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
@@ -1227,58 +1235,6 @@ export type AssetCommentUncheckedUpdateManyWithoutReplyToInput = {
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
export type AssetCommentCreateManySessionInput = {
id?: string
message?: string | null
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
second?: number | null
createdAt?: Date | string
updatedAt?: Date | string
assetId: string
creatorId?: string | null
replyToId?: string | null
}
export type AssetCommentUpdateWithoutSessionInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
asset?: Prisma.AssetUpdateOneRequiredWithoutCommentsNestedInput
creator?: Prisma.UserUpdateOneWithoutCommentsNestedInput
replyTo?: Prisma.AssetCommentUpdateOneWithoutRepliesNestedInput
replies?: Prisma.AssetCommentUpdateManyWithoutReplyToNestedInput
attachments?: Prisma.AssetCommentAttachmentUpdateManyWithoutCommentNestedInput
}
export type AssetCommentUncheckedUpdateWithoutSessionInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assetId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
replyToId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
replies?: Prisma.AssetCommentUncheckedUpdateManyWithoutReplyToNestedInput
attachments?: Prisma.AssetCommentAttachmentUncheckedUpdateManyWithoutCommentNestedInput
}
export type AssetCommentUncheckedUpdateManyWithoutSessionInput = {
id?: Prisma.StringFieldUpdateOperationsInput | string
message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
annotation?:PrismaJson.AnnotationList | Prisma.NullableJsonNullValueInput
second?: Prisma.NullableFloatFieldUpdateOperationsInput | number | null
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
assetId?: Prisma.StringFieldUpdateOperationsInput | string
creatorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
replyToId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
}
/**
* Count Type AssetCommentCountOutputType