feat(ST-bsjoqjnr): UserQuestion model + PLAN_CHAT enum-waarde
- Voeg PLAN_CHAT toe aan ClaudeJobKind enum - Voeg UserQuestionStatus enum toe (pending, answered) - Voeg UserQuestion model toe met idea_id, user_id, question, answer, status - Koppel user_questions relatie aan Idea model - Migratie: 20260505120000_add_user_question_plan_chat Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
881ee007e5
commit
8bccb56b21
2 changed files with 55 additions and 3 deletions
|
|
@ -90,6 +90,7 @@ enum ClaudeJobKind {
|
|||
TASK_IMPLEMENTATION
|
||||
IDEA_GRILL
|
||||
IDEA_MAKE_PLAN
|
||||
PLAN_CHAT
|
||||
}
|
||||
|
||||
enum IdeaLogType {
|
||||
|
|
@ -101,6 +102,11 @@ enum IdeaLogType {
|
|||
JOB_EVENT
|
||||
}
|
||||
|
||||
enum UserQuestionStatus {
|
||||
pending
|
||||
answered
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
username String @unique
|
||||
|
|
@ -409,9 +415,10 @@ model Idea {
|
|||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
questions ClaudeQuestion[]
|
||||
jobs ClaudeJob[]
|
||||
logs IdeaLog[]
|
||||
questions ClaudeQuestion[]
|
||||
jobs ClaudeJob[]
|
||||
logs IdeaLog[]
|
||||
user_questions UserQuestion[]
|
||||
|
||||
@@unique([user_id, code])
|
||||
@@index([user_id, archived, status])
|
||||
|
|
@ -432,6 +439,23 @@ model IdeaLog {
|
|||
@@map("idea_logs")
|
||||
}
|
||||
|
||||
model UserQuestion {
|
||||
id String @id @default(cuid())
|
||||
idea_id String
|
||||
user_id String
|
||||
question String @db.Text
|
||||
answer String? @db.Text
|
||||
status UserQuestionStatus @default(pending)
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
idea Idea @relation(fields: [idea_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([idea_id, status])
|
||||
@@index([user_id])
|
||||
@@map("user_questions")
|
||||
}
|
||||
|
||||
model LoginPairing {
|
||||
id String @id @default(cuid())
|
||||
secret_hash String
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue