폼 전송 TDD추가 및 암호화 적용 중
CI / test (push) Failing after 4m41s
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-12-02 11:02:15 +09:00
parent d0766fca45
commit 3e223a45d4
40 changed files with 1290 additions and 31 deletions
@@ -0,0 +1,19 @@
-- CreateTable
CREATE TABLE "FormSubmission" (
"id" TEXT NOT NULL,
"projectId" TEXT,
"projectSlug" TEXT NOT NULL,
"userId" TEXT,
"payloadJson" JSONB NOT NULL,
"sensitiveEnc" TEXT,
"metaJson" JSONB,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "FormSubmission_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "FormSubmission" ADD CONSTRAINT "FormSubmission_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "FormSubmission" ADD CONSTRAINT "FormSubmission_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
+17
View File
@@ -25,6 +25,8 @@ model Project {
assets Asset[]
formSubmissions FormSubmission[]
// 인증 도입을 위한 관계: 프로젝트는 특정 User 가 소유할 수 있다.
userId String?
user User? @relation(fields: [userId], references: [id])
@@ -39,6 +41,8 @@ model User {
updatedAt DateTime @updatedAt
projects Project[]
formSubmissions FormSubmission[]
}
model Asset {
@@ -57,3 +61,16 @@ enum ProjectStatus {
PUBLISHED
ARCHIVED
}
model FormSubmission {
id String @id @default(uuid())
project Project? @relation(fields: [projectId], references: [id], onDelete: SetNull)
projectId String?
projectSlug String
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
userId String?
payloadJson Json
sensitiveEnc String?
metaJson Json?
createdAt DateTime @default(now())
}