@@ -113,6 +113,37 @@ enum ProjectType {
|
||||
EPISODIC
|
||||
}
|
||||
|
||||
enum TakeQuality {
|
||||
HERO
|
||||
GOOD
|
||||
PRINT
|
||||
NO_GOOD
|
||||
FALSE_START
|
||||
}
|
||||
|
||||
enum AttachmentFileType {
|
||||
IMAGE
|
||||
VIDEO
|
||||
HDRI
|
||||
LIDAR
|
||||
LENS_GRID
|
||||
PDF
|
||||
OTHER
|
||||
}
|
||||
|
||||
enum AttachmentCategory {
|
||||
SLATE
|
||||
CAMERA_POSITION
|
||||
WIDE_REFERENCE
|
||||
LENS
|
||||
LIGHTING
|
||||
HDRI
|
||||
TRACKING
|
||||
TEXTURE
|
||||
WITNESS
|
||||
MISCELLANEOUS
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// AUTH MODELS (NextAuth v5 compatible)
|
||||
// ─────────────────────────────────────────────
|
||||
@@ -149,6 +180,9 @@ model User {
|
||||
createdTasks Task[] @relation("TaskCreator")
|
||||
sharedVersions Version[] @relation("VersionSharedBy")
|
||||
ledAssets Asset[] @relation("AssetLead")
|
||||
createdShootDays ShootDay[] @relation("ShootDayCreator")
|
||||
createdTakes Take[] @relation("TakeCreator")
|
||||
uploadedTakeAttachments TakeAttachment[] @relation("TakeAttachmentUploader")
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -256,6 +290,7 @@ model Project {
|
||||
shotGroups ShotGroup[]
|
||||
reviewSessions ReviewSession[]
|
||||
episodeDueDates EpisodeDueDate[]
|
||||
shootDays ShootDay[]
|
||||
|
||||
@@map("projects")
|
||||
}
|
||||
@@ -322,6 +357,7 @@ model Shot {
|
||||
versions Version[]
|
||||
tasks Task[]
|
||||
footagePlates FootagePlate[]
|
||||
loggedTakes Take[] @relation("TakeToShot")
|
||||
|
||||
@@unique([projectId, shotCode])
|
||||
@@map("shots")
|
||||
@@ -571,3 +607,130 @@ model DisplayEvent {
|
||||
@@index([createdAt])
|
||||
@@map("display_events")
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// SHOOT LOG MODELS
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
model ShootDay {
|
||||
id String @id @default(cuid())
|
||||
projectId String
|
||||
date DateTime
|
||||
unit String @default("A")
|
||||
label String?
|
||||
notes String? @db.Text
|
||||
createdById String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
||||
createdBy User? @relation("ShootDayCreator", fields: [createdById], references: [id], onDelete: SetNull)
|
||||
setups Setup[]
|
||||
|
||||
@@map("shoot_days")
|
||||
}
|
||||
|
||||
model Setup {
|
||||
id String @id @default(cuid())
|
||||
shootDayId String
|
||||
name String
|
||||
description String? @db.Text
|
||||
sortOrder Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
shootDay ShootDay @relation(fields: [shootDayId], references: [id], onDelete: Cascade)
|
||||
takes Take[]
|
||||
|
||||
@@map("setups")
|
||||
}
|
||||
|
||||
model Take {
|
||||
id String @id @default(cuid())
|
||||
setupId String
|
||||
takeNumber Int
|
||||
|
||||
// Optional link back to a pipeline shot
|
||||
pipelineShotId String?
|
||||
|
||||
// General
|
||||
scene String?
|
||||
shotLabel String?
|
||||
unitLabel String?
|
||||
|
||||
// Camera
|
||||
cameraLetter String?
|
||||
clipName String?
|
||||
roll String?
|
||||
cameraModel String?
|
||||
resolution String?
|
||||
codec String?
|
||||
fps Float?
|
||||
shutter String?
|
||||
iso Int?
|
||||
whiteBalance Int?
|
||||
colourSpace String?
|
||||
|
||||
// Lens
|
||||
lensSet String?
|
||||
lens String?
|
||||
tStop String?
|
||||
filters String?
|
||||
isAnamorphic Boolean @default(false)
|
||||
|
||||
// Tracking
|
||||
hasHdri Boolean @default(false)
|
||||
hasChromeBall Boolean @default(false)
|
||||
hasGreyBall Boolean @default(false)
|
||||
hasMacbeth Boolean @default(false)
|
||||
hasCleanPlate Boolean @default(false)
|
||||
hasSurvey Boolean @default(false)
|
||||
hasLidar Boolean @default(false)
|
||||
hasWitnessCamera Boolean @default(false)
|
||||
hasLensGrid Boolean @default(false)
|
||||
hasTexturePhotos Boolean @default(false)
|
||||
hasPhotogrammetry Boolean @default(false)
|
||||
|
||||
// Environment
|
||||
weather String?
|
||||
sunDirection String?
|
||||
artificialLights String? @db.Text
|
||||
|
||||
// Supervisor
|
||||
supervisorNotes String? @db.Text
|
||||
continuityNotes String? @db.Text
|
||||
vfxRequirements String? @db.Text
|
||||
quality TakeQuality @default(PRINT)
|
||||
|
||||
createdById String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
setup Setup @relation(fields: [setupId], references: [id], onDelete: Cascade)
|
||||
pipelineShot Shot? @relation("TakeToShot", fields: [pipelineShotId], references: [id], onDelete: SetNull)
|
||||
createdBy User? @relation("TakeCreator", fields: [createdById], references: [id], onDelete: SetNull)
|
||||
attachments TakeAttachment[]
|
||||
|
||||
@@unique([setupId, takeNumber])
|
||||
@@map("takes")
|
||||
}
|
||||
|
||||
model TakeAttachment {
|
||||
id String @id @default(cuid())
|
||||
takeId String
|
||||
fileUrl String
|
||||
fileKey String @default("")
|
||||
fileName String
|
||||
fileSize BigInt?
|
||||
fileType AttachmentFileType @default(IMAGE)
|
||||
category AttachmentCategory @default(MISCELLANEOUS)
|
||||
caption String?
|
||||
sortOrder Int @default(0)
|
||||
uploadedById String?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
take Take @relation(fields: [takeId], references: [id], onDelete: Cascade)
|
||||
uploadedBy User? @relation("TakeAttachmentUploader", fields: [uploadedById], references: [id], onDelete: SetNull)
|
||||
|
||||
@@map("take_attachments")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user