@campus-labs/prisma-client 0.18.2 → 0.19.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/.claude/settings.local.json +11 -0
- package/package.json +1 -1
- package/prisma/schema.prisma +60 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(ls -la /Users/nunomatos/Desktop/SerMais/prisma/.env*)",
|
|
5
|
+
"Bash(git check-ignore -v /Users/nunomatos/Desktop/SerMais/prisma/.env.staging)",
|
|
6
|
+
"Bash(git check-ignore -v .env.staging)",
|
|
7
|
+
"Bash(ls -la /Users/nunomatos/Desktop/SerMais/prisma/*.ts /Users/nunomatos/Desktop/SerMais/prisma/*.js)",
|
|
8
|
+
"Bash(grep -r \"\\\\.password\" /Users/nunomatos/Desktop/SerMais --include=\"*.ts\" --include=\"*.js\" ! -path \"*/node_modules/*\" ! -path \"*/.next/*\" ! -path \"*/dist/*\")"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
}
|
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -663,6 +663,7 @@ model initiatives_tags {
|
|
|
663
663
|
@@index([tag_id], map: "idx_initiatives_tags_tag")
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
+
|
|
666
667
|
model projects {
|
|
667
668
|
id Int @id @default(autoincrement())
|
|
668
669
|
is_draft Boolean @default(true)
|
|
@@ -676,14 +677,16 @@ model projects {
|
|
|
676
677
|
version Int @default(1)
|
|
677
678
|
current_state Json
|
|
678
679
|
repository_ai_badges Json[]
|
|
680
|
+
active_thread_id Int?
|
|
679
681
|
head_patch_id Int? @unique
|
|
680
682
|
initiatives initiatives[]
|
|
681
683
|
patches patches[]
|
|
682
|
-
|
|
684
|
+
snapshots snapshots[]
|
|
685
|
+
chats chats[]
|
|
683
686
|
authors users @relation("ProjectAuthor", fields: [author_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
684
687
|
editors users? @relation("ProjectEditor", fields: [editor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
685
|
-
|
|
686
|
-
|
|
688
|
+
head_patch patches? @relation("ProjectHead", fields: [head_patch_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
689
|
+
active_thread threads? @relation("ProjectActiveThread", fields: [active_thread_id], references: [id], onDelete: SetNull)
|
|
687
690
|
|
|
688
691
|
@@index([author_id], map: "idx_projects_author")
|
|
689
692
|
@@index([editor_id], map: "idx_projects_designer")
|
|
@@ -719,4 +722,58 @@ model users_ai_requests {
|
|
|
719
722
|
users users @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
720
723
|
|
|
721
724
|
@@index([user_id], map: "idx_users_ai_requests_user")
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
model chats {
|
|
729
|
+
id Int @id @default(autoincrement())
|
|
730
|
+
project_id Int
|
|
731
|
+
is_current Boolean @default(true)
|
|
732
|
+
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
733
|
+
updated_at DateTime @default(now()) @db.Timestamp(6)
|
|
734
|
+
|
|
735
|
+
project projects @relation(fields: [project_id], references: [id], onDelete: Cascade)
|
|
736
|
+
threads threads[]
|
|
737
|
+
|
|
738
|
+
@@index([project_id], map: "idx_chats_project")
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
model threads {
|
|
742
|
+
id Int @id @default(autoincrement())
|
|
743
|
+
chat_id Int
|
|
744
|
+
status String @default("ACTIVE") @db.VarChar(20)
|
|
745
|
+
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
746
|
+
updated_at DateTime @default(now()) @db.Timestamp(6)
|
|
747
|
+
|
|
748
|
+
chat chats @relation(fields: [chat_id], references: [id], onDelete: Cascade)
|
|
749
|
+
active_for_projects projects[] @relation("ProjectActiveThread")
|
|
750
|
+
ai_patches ai_patches[]
|
|
751
|
+
conversations ai_conversations[]
|
|
752
|
+
|
|
753
|
+
@@index([chat_id], map: "idx_threads_chat")
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
model ai_conversations {
|
|
757
|
+
id Int @id @default(autoincrement())
|
|
758
|
+
thread_id Int
|
|
759
|
+
prompt String @db.Text
|
|
760
|
+
response String @db.Text
|
|
761
|
+
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
762
|
+
|
|
763
|
+
thread threads @relation(fields: [thread_id], references: [id], onDelete: Cascade)
|
|
764
|
+
|
|
765
|
+
@@index([thread_id], map: "idx_conversations_thread")
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
model ai_patches {
|
|
769
|
+
id Int @id @default(autoincrement())
|
|
770
|
+
thread_id Int
|
|
771
|
+
forward_ops Json[]
|
|
772
|
+
reverse_ops Json[]
|
|
773
|
+
prompt String @db.Text
|
|
774
|
+
created_at DateTime @default(now()) @db.Timestamp(6)
|
|
775
|
+
|
|
776
|
+
thread threads @relation(fields: [thread_id], references: [id], onDelete: Cascade)
|
|
777
|
+
|
|
778
|
+
@@index([thread_id], map: "idx_ai_patches_thread")
|
|
722
779
|
}
|