@campus-labs/prisma-client 0.18.1 → 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 +61 -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
|
@@ -116,6 +116,7 @@ model initiatives {
|
|
|
116
116
|
title String @db.VarChar(100)
|
|
117
117
|
description String @db.VarChar(3000)
|
|
118
118
|
img Json[]
|
|
119
|
+
img_header Json?
|
|
119
120
|
inscription_deadline DateTime @db.Timestamp(6)
|
|
120
121
|
start_date DateTime @db.Timestamp(6)
|
|
121
122
|
end_date DateTime @db.Timestamp(6)
|
|
@@ -662,6 +663,7 @@ model initiatives_tags {
|
|
|
662
663
|
@@index([tag_id], map: "idx_initiatives_tags_tag")
|
|
663
664
|
}
|
|
664
665
|
|
|
666
|
+
|
|
665
667
|
model projects {
|
|
666
668
|
id Int @id @default(autoincrement())
|
|
667
669
|
is_draft Boolean @default(true)
|
|
@@ -675,14 +677,16 @@ model projects {
|
|
|
675
677
|
version Int @default(1)
|
|
676
678
|
current_state Json
|
|
677
679
|
repository_ai_badges Json[]
|
|
680
|
+
active_thread_id Int?
|
|
678
681
|
head_patch_id Int? @unique
|
|
679
682
|
initiatives initiatives[]
|
|
680
683
|
patches patches[]
|
|
681
|
-
|
|
684
|
+
snapshots snapshots[]
|
|
685
|
+
chats chats[]
|
|
682
686
|
authors users @relation("ProjectAuthor", fields: [author_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
683
687
|
editors users? @relation("ProjectEditor", fields: [editor_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
684
|
-
|
|
685
|
-
|
|
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)
|
|
686
690
|
|
|
687
691
|
@@index([author_id], map: "idx_projects_author")
|
|
688
692
|
@@index([editor_id], map: "idx_projects_designer")
|
|
@@ -718,4 +722,58 @@ model users_ai_requests {
|
|
|
718
722
|
users users @relation(fields: [user_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
719
723
|
|
|
720
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")
|
|
721
779
|
}
|