# `Beancount.Schemas.Document`
[🔗](https://github.com/thanos/beancount_ex/blob/v0.6.0/lib/beancount/schemas/directives.ex#L245)

Persisted `document` directive (table `beancount_documents`).

Storage-layer counterpart of `Beancount.Directives.Document`.

## Fields

  * `date` - the day the document is filed.
  * `account` - account the document belongs to.
  * `path` - filesystem path to the document.
  * `metadata` - arbitrary key/value map.
  * `file_order` - zero-based position of the directive in the source.

## Example

    %Beancount.Schemas.Document{
      date: ~D[2026-01-04],
      account: "Assets:Bank",
      path: "/receipts/2026-01-04.pdf",
      metadata: %{},
      file_order: 11
    }

# `t`

```elixir
@type t() :: %Beancount.Schemas.Document{
  __meta__: term(),
  account: term(),
  date: term(),
  file_order: term(),
  id: term(),
  inserted_at: term(),
  metadata: term(),
  path: term(),
  updated_at: term()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
