---
title: document
framework: appintents
role: symbol
role_heading: Instance Property
path: appintents/assistantschemas/wordprocessorentity/document
---

# document

The app entity describes a text document.

## Declaration

```swift
var document: some AssistantSchemas.Entity { get }
```

## Overview

Overview Use Swift macros that generate additional properties and add protocol conformance for your app entity implementation.The following example shows an app entity that conforms to the .wordProcessor.document schema: @AppEntity(schema: .wordProcessor.document) struct WordProcessorDocumentEntity: AppEntity {     struct Query: EntityStringQuery {         func entities(for identifiers: [WordProcessorDocumentEntity.ID]) async throws -> [WordProcessorDocumentEntity] { [] }         func entities(matching string: String) async throws -> [WordProcessorDocumentEntity] { [] }     }

static var defaultQuery = Query()     var displayRepresentation: DisplayRepresentation { "Text Document" }

let id = UUID()

@Property     var name: String

@Property     var creationDate: Date?

@Property     var modificationDate: Date? }
