@@ -0,0 +1,17 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "shot_references" (
|
||||
"id" TEXT NOT NULL,
|
||||
"shotId" TEXT NOT NULL,
|
||||
"label" TEXT,
|
||||
"fileUrl" TEXT NOT NULL,
|
||||
"fileKey" TEXT NOT NULL DEFAULT '',
|
||||
"fileName" TEXT NOT NULL DEFAULT '',
|
||||
"fileSize" BIGINT,
|
||||
"sortOrder" INTEGER NOT NULL DEFAULT 0,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "shot_references_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "shot_references" ADD CONSTRAINT "shot_references_shotId_fkey" FOREIGN KEY ("shotId") REFERENCES "shots"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -357,6 +357,7 @@ model Shot {
|
||||
versions Version[]
|
||||
tasks Task[]
|
||||
footagePlates FootagePlate[]
|
||||
references ShotReference[]
|
||||
loggedTakes Take[] @relation("TakeToShot")
|
||||
|
||||
@@unique([projectId, shotCode])
|
||||
@@ -379,6 +380,22 @@ model FootagePlate {
|
||||
@@map("footage_plates")
|
||||
}
|
||||
|
||||
model ShotReference {
|
||||
id String @id @default(cuid())
|
||||
shotId String
|
||||
label String?
|
||||
fileUrl String
|
||||
fileKey String @default("")
|
||||
fileName String @default("")
|
||||
fileSize BigInt?
|
||||
sortOrder Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
shot Shot @relation(fields: [shotId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@map("shot_references")
|
||||
}
|
||||
|
||||
model ShotGroup {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
Reference in New Issue
Block a user