feat: add initial backend and frontend structure with models, DTOs, and WebSocket events
This commit is contained in:
21
apps/backend/prisma/models/storyBranch.prisma
Normal file
21
apps/backend/prisma/models/storyBranch.prisma
Normal file
@@ -0,0 +1,21 @@
|
||||
// Story branching for narrative generation (Phase 2)
|
||||
|
||||
model StoryBranch {
|
||||
id String @id @default(uuid())
|
||||
title String?
|
||||
content String
|
||||
userDirection String
|
||||
generationParams Json?
|
||||
depth Int @default(0)
|
||||
branchOrder Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
conversationId String
|
||||
conversation Conversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)
|
||||
parentId String?
|
||||
parent StoryBranch? @relation("BranchTree", fields: [parentId], references: [id], onDelete: Cascade)
|
||||
children StoryBranch[] @relation("BranchTree")
|
||||
|
||||
@@index([conversationId])
|
||||
@@index([parentId])
|
||||
}
|
||||
Reference in New Issue
Block a user