Move document classification from document to document version

Classification now lives exclusively on DocumentVersion. The field is
removed from the Document model, all SQL queries, GraphQL Document
type, SignableDocument type, UpdateDocumentInput, and MCP Document
schema.

New documents still accept classification in CreateDocumentInput,
applied to the first version. New drafts inherit classification from
the previous version. PDF generation uses the version classification.

The drawer allows editing classification on draft versions via the
updateDocumentVersion mutation. Classification is read-only on
published versions.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-03-27 16:04:38 +01:00
parent 851e585b9b
commit 5d6d0bdd7f
16 changed files with 155 additions and 151 deletions

View File

@@ -5186,7 +5186,6 @@ components:
- organization_id
- title
- document_type
- classification
- trust_center_visibility
- status
- created_at
@@ -5204,9 +5203,6 @@ components:
document_type:
$ref: "#/components/schemas/DocumentType"
description: Document type
classification:
$ref: "#/components/schemas/DocumentClassification"
description: Document classification
current_published_major:
type:
- integer
@@ -5459,9 +5455,6 @@ components:
title:
type: string
description: Document title
classification:
$ref: "#/components/schemas/DocumentClassification"
description: Document classification
document_type:
$ref: "#/components/schemas/DocumentType"
description: Document type
@@ -5580,7 +5573,6 @@ components:
type: object
required:
- document_version_id
- content
properties:
document_version_id:
$ref: "#/components/schemas/GID"
@@ -5588,6 +5580,9 @@ components:
content:
type: string
description: Document content
classification:
$ref: "#/components/schemas/DocumentClassification"
description: Document classification
UpdateDocumentVersionOutput:
type: object