feat(deliveries): delivery requests and upload/share evidence
Deploy / deploy (push) Successful in 5m17s
Deploy / deploy (push) Successful in 5m17s
A built package used to become DELIVERED on one click with nothing behind it, and nothing recorded what a client had asked for. - Marking delivered is now two recorded steps: Record upload (the link on the client's portal, contents confirmed) then Share link (who it was sent to). The second is refused until the first is on record. - Delivery requests log a client's ask by episode, pasted shot codes or a Shot Status selection. A line closes only when its shot goes out with evidence after the request was logged; a request can otherwise only be cancelled with a reason. - Delivered Outside Pipeline takes an upload link and recipient, required for shots on an open request. - The dashboard gains an Awaiting delivery section listing open requests and built packages the client does not have yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+60
-1
@@ -380,6 +380,7 @@ model Project {
|
||||
/// is why it lives here rather than in per-machine panel settings.
|
||||
pipelineConfig Json?
|
||||
deliveryPackages DeliveryPackage[]
|
||||
deliveryRequests DeliveryRequest[]
|
||||
|
||||
@@map("projects")
|
||||
}
|
||||
@@ -463,6 +464,11 @@ model Shot {
|
||||
manualDeliveredAt DateTime?
|
||||
manualDeliveredById String?
|
||||
manualDeliveryNote String? @db.Text
|
||||
/// Where a manual delivery was uploaded and who was sent the link. Optional
|
||||
/// for a backfill, but a manual delivery only closes a DeliveryRequest line
|
||||
/// when both are present — the same evidence a package needs.
|
||||
manualDeliveryUrl String?
|
||||
manualDeliverySharedWith String?
|
||||
// Netflix slate fields — managed via the Slate tab, used by the preview pipeline
|
||||
slateType String?
|
||||
slateDescription String? @db.Text
|
||||
@@ -480,6 +486,7 @@ model Shot {
|
||||
references ShotReference[]
|
||||
loggedTakes Take[] @relation("TakeToShot")
|
||||
exports Export[]
|
||||
deliveryRequestLines DeliveryRequestLine[]
|
||||
|
||||
@@unique([projectId, shotCode])
|
||||
@@map("shots")
|
||||
@@ -1155,7 +1162,16 @@ model DeliveryPackage {
|
||||
createdById String
|
||||
createdAt DateTime @default(now())
|
||||
builtAt DateTime?
|
||||
deliveredAt DateTime?
|
||||
|
||||
// Handoff evidence. Built is not delivered: the folder still has to be
|
||||
// uploaded to the client's portal and the link sent to a person, and each of
|
||||
// those is recorded separately so a package cannot be "delivered" on a hunch.
|
||||
uploadUrl String? // where it lives on the client's side (Content Hub folder)
|
||||
uploadedAt DateTime?
|
||||
uploadedById String?
|
||||
sharedWith String? // who was sent the link
|
||||
sharedNote String?
|
||||
deliveredAt DateTime? // when the link was shared — the package is DELIVERED from here
|
||||
deliveredById String?
|
||||
|
||||
items DeliveryItem[]
|
||||
@@ -1196,6 +1212,49 @@ model DeliveryItem {
|
||||
@@map("delivery_items")
|
||||
}
|
||||
|
||||
/// Something a client asked for ("EXRs for 116"), logged by hand because the
|
||||
/// ask arrives over chat. It has no status of its own: a line is closed when
|
||||
/// its shot has gone out with evidence after the request was logged, and the
|
||||
/// request is closed when every line is — so it cannot be ticked off by hand.
|
||||
model DeliveryRequest {
|
||||
id String @id @default(cuid())
|
||||
projectId String
|
||||
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
||||
requestNumber Int // sequential per project → "Request #4"
|
||||
episode String @default("") // set when a whole episode was asked for
|
||||
deliverable String @default("EXR") // EXR | MOV | EXR_AND_MOV — what the client asked for
|
||||
requestedBy String // who at the client asked
|
||||
note String? @db.Text
|
||||
dueDate DateTime?
|
||||
createdById String
|
||||
createdAt DateTime @default(now())
|
||||
cancelledAt DateTime?
|
||||
cancelledById String?
|
||||
cancelReason String?
|
||||
|
||||
lines DeliveryRequestLine[]
|
||||
|
||||
@@unique([projectId, requestNumber])
|
||||
@@index([projectId, cancelledAt])
|
||||
@@map("delivery_requests")
|
||||
}
|
||||
|
||||
/// One requested shot. The shot list is a snapshot taken when the request was
|
||||
/// logged; codes are denormalised for the same reason DeliveryItem's are.
|
||||
model DeliveryRequestLine {
|
||||
id String @id @default(cuid())
|
||||
requestId String
|
||||
request DeliveryRequest @relation(fields: [requestId], references: [id], onDelete: Cascade)
|
||||
shotId String
|
||||
shot Shot @relation(fields: [shotId], references: [id], onDelete: Cascade)
|
||||
shotCode String
|
||||
clientCode String?
|
||||
|
||||
@@unique([requestId, shotId])
|
||||
@@index([shotId])
|
||||
@@map("delivery_request_lines")
|
||||
}
|
||||
|
||||
model SketchTemplate {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
|
||||
Reference in New Issue
Block a user