# Entities and the `id`

An entity is a kind of stored record with a lasting identity. Each one is
declared in its own file under its domain's `entities/` folder:

```jadpo
// domains/planning/entities/project.jadpo
/// A group of todos with a shared goal.
entity Project {
    id: Uuid  // version 7, generated on create
    owner_id: User.id {
        on_delete: OnDelete.restricted
    }
    name: ProjectName
}
```

Every entity's identity is one field, `id`, based on `Uuid`. Jadpo
generates it as a version 7 UUID when the record is created, or as the
version its named type pins, and callers never supply it. Other code
refers to the field as `Project.id`.

There is no compound identity. A link between two entities is an entity
of its own, with its own `id` and a unique rule over the two references.

An entity value is a snapshot that never changes: reading one of its
fields never touches the database.
