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

@@ -104,7 +104,6 @@ func TestDocument_Create(t *testing.T) {
id
title
documentType
classification
}
}
}
@@ -120,10 +119,9 @@ func TestDocument_Create(t *testing.T) {
CreateDocument struct {
DocumentEdge struct {
Node struct {
ID string `json:"id"`
Title string `json:"title"`
DocumentType string `json:"documentType"`
Classification string `json:"classification"`
ID string `json:"id"`
Title string `json:"title"`
DocumentType string `json:"documentType"`
} `json:"node"`
} `json:"documentEdge"`
} `json:"createDocument"`