# Mermaid event model in Markdown to PDF

An event model lays out screens, commands, events and the views built from them in time frames, in the lanes event modeling uses.

Screens, commands, events and read models in time frames, with the views that read from each event, for a city library's loan service.

- PDF: https://legivel.com/examples/mermaid-diagrams/event-model.pdf
- Page: https://legivel.com/examples/mermaid-diagrams/event-model
- Open in the editor: https://legivel.com/markdown-to-pdf?sample=mermaid-event-model
- More mermaid diagrams in Markdown to PDF: https://legivel.com/examples/mermaid-diagrams

## Markdown source

````markdown
---
title: Loan service, event model
author: Library systems
---

# How a loan flows through the system

The city library of Tartu modeled its online loan service as a sequence of time frames. Each frame is a screen, a command, an event or a view built from events.

```mermaid
eventmodeling
tf 01 ui Catalogue
tf 02 cmd ReserveBook
tf 03 evt BookReserved
tf 04 rmo ReservationList ->> 03
tf 05 ui PickupDesk
tf 06 cmd LendBook
tf 07 evt BookLent
tf 08 rmo LoansDue ->> 07
```

The reminder service reads the loans-due view only; it never calls the loan service directly.
````
