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

@@ -2440,7 +2440,6 @@ type Document implements Node {
title: String!
description: String
documentType: DocumentType!
classification: DocumentClassification!
currentPublishedMajor: Int
currentPublishedMinor: Int
trustCenterVisibility: TrustCenterVisibility!
@@ -2481,7 +2480,6 @@ type EmployeeDocument
title: String!
description: String
documentType: DocumentType!
classification: DocumentClassification!
signed: Boolean @goField(forceResolver: true)
approvalState: DocumentVersionApprovalDecisionState @goField(forceResolver: true)
@@ -2505,6 +2503,7 @@ type EmployeeDocumentVersion
major: Int!
minor: Int!
status: DocumentVersionStatus!
classification: DocumentClassification!
signed: Boolean! @goField(forceResolver: true)
approvalDecision: DocumentVersionApprovalDecision @goField(forceResolver: true)
publishedAt: Datetime
@@ -4482,7 +4481,6 @@ input UpdateDocumentInput {
title: String
content: String
documentType: DocumentType
classification: DocumentClassification
trustCenterVisibility: TrustCenterVisibility
}
@@ -5738,7 +5736,8 @@ input DeleteDraftDocumentVersionInput {
input UpdateDocumentVersionInput {
documentVersionId: ID!
content: String!
content: String
classification: DocumentClassification
}
input CancelSignatureRequestInput {