DeskDocument class
Platform-agnostic CMS document model.
This represents document metadata without the actual content data. The content is stored in DocumentVersion objects.
Constructors
-
DeskDocument({String? id, required String clientId, required String documentType, required String title, String? slug, bool isDefault = false, Map<
String, dynamic> ? activeVersionData, DateTime? createdAt, DateTime? updatedAt, String? createdByUserId, String? updatedByUserId, String? crdtHlc}) -
const
-
DeskDocument.fromJson(Map<
String, dynamic> json) -
Creates a DeskDocument from a JSON map.
factory
Properties
-
activeVersionData
→ Map<
String, dynamic> ? -
Cached data from the active (published) version
final
- clientId → String
-
Client ID (multi-tenant support)
final
- crdtHlc → String?
-
The document's current CRDT HLC (Hybrid Logical Clock) timestamp.
final
- createdAt → DateTime?
-
When the document was created
final
- createdByUserId → String?
-
ID of the user who created this document
final
- documentType → String
-
The document type identifier (e.g., 'article', 'page', 'product')
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String?
-
Database ID (null for new documents not yet persisted)
final
- isDefault → bool
-
Whether this is the default document for this type
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slug → String?
-
URL-friendly slug
final
- title → String
-
The document title
final
- updatedAt → DateTime?
-
When the document was last updated
final
- updatedByUserId → String?
-
ID of the user who last updated this document
final
Methods
-
copyWith(
{String? id, String? clientId, String? documentType, String? title, String? slug, bool? isDefault, Map< String, dynamic> ? activeVersionData, DateTime? createdAt, DateTime? updatedAt, String? createdByUserId, String? updatedByUserId, String? crdtHlc}) → DeskDocument - Creates a copy of this document with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this document to a JSON map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override