DocumentationData Model

Data Model

Define the users, lists, tasks, and reminders tables and their relationships.


Use Data Model to define stored data, API payloads, and other data structures. In this example, foreign keys express ownership and list membership, and an enum defines the allowed task statuses.

Data model preview

Data Model
usersSQL table
iduuid
emailvarchar
display_namevarchar
todo_listsSQL table
iduuid
owner_iduuid
namevarchar
tasksSQL table
iduuid
list_iduuid
titletext
statusvarchar
due_attimestamp
completed_attimestamp
remindersSQL table
iduuid
task_iduuid
channelvarchar
send_attimestamp
sent_attimestamp
task_statusEnum / Dictionary
ownercontainsschedulesstatus

Around tasks, the arrows read owner, contains, schedules, and status. In the app, Connections also lists the process step that writes this table.

Tables and relationships

Everything sits in the namespace app. A namespace is a label that groups entities on the canvas. Removing it would clear the grouping and leave the entities.

  • users — one row per account: id, email, display_name. Lists are personal, so the owner has to be a row before a list can exist.
  • todo_lists — a named list belonging to one user. owner_id points at users.id. This is the schema behind Organise tasks into lists.
  • tasks — one row per task. list_id points at todo_lists.id, so a task has one list, which is the acceptance criterion on File tasks into lists. The use cases require a title, an optional due date, and a completion timestamp. status points at the enum.
  • reminders — a scheduled reminder for a task. task_id points at tasks.id. channel, send_at, and sent_at. The delivery time stays empty until the reminder is sent. This lets the delivery process distinguish pending reminders from completed ones. A task can exist without a reminder.
  • task_status — an enum, values open, completed, cancelled. Already complete? on the process canvas is this column. The task’s status field references this shared set of values.

tasks also links to the process step that writes it, the Low-level design modules that validate writes, and the decision to store data in Postgres.

Node types

The ten entity types determine which field types and properties are available:

  • Stored data — SQL table, NoSQL document.
  • Data contracts — REST payload, GraphQL type, event or message, DTO, form, file.
  • Value sets — enum / dictionary. Other entities reference the values defined here.
  • Basic — a free-form entity, for a shape that is none of the above.

The project uses four tables and one enum. The gallery also shows the types you could use for additions such as an export file or a create-task request.

Data Model node types
  • SQL tableusersRelational table with SQL field types.
  • NoSQL Documenttask_draftDocument store schema for MongoDB, Firestore, and similar stores.
  • REST PayloadCreate task requestJSON request or response contract for REST APIs.
  • GraphQL TypeTaskGraphQL object or input type definition.
  • Event / MessageTaskDueAsynchronous event or message contract.
  • FileTask exportInput or output file shape with format metadata.
  • FormNew task formUI form contract with field-level validation metadata.
  • DTOTask summaryData transfer object passed between layers or steps.
  • Enum / Dictionarytask_statusClosed values or named constants referenced by other entities.
  • BasicReminder windowCustom free-form entity defined by the user.

Working with entities

  • Choose the entity type before adding fields. SQL tables, REST payloads, and enums each offer different field types and properties.
  • Reference a shared enum when several entities use the same values. Here, tasks references task_status.
  • A namespace groups entities and shows up in filters. Deleting the group clears membership. It does not delete the entities.
  • Use this layer for data structure and relationships. Database indexes, dialect-specific details, and query plans belong in the implementation.

Next

Continue to Architecture decisions for the reasons behind choosing Postgres and asynchronous reminder delivery.