Finished documentation for this model. Lead with the stored concept, lifecycle, ownership, and important relationships.
Also name any value the entity exposes that is derived rather than
stored (an aggregate or rollup over related rows) together with its
aggregation path — the relation it sums over and that relation's
direction, so downstream phases aggregate from the correct side (rows
that reference this entity in one role are not the rows where it acts in
another). When the source is a polymorphic {type, id} pointer, state
the join to perform — downstream phases read this prose to surface that
attribute, so stating only "query output" drops both the attribute and
its direction.
Foreign key fields establishing relationships to other models.
GIN indexes for PostgreSQL full-text search (trigram).
Final table/model name.
Use a plural, snake_case, prefix-aware table name. When stance is
"material", place the special mv_ prefix before the configured database
prefix.
Regular persisted data fields owned by this row, including values that a snapshot/history row intentionally captures at a point in time.
Every model must include a non-null created_at datetime plain field.
Mutable business rows also include non-null updated_at, while
deleted_at is added only for soft-delete requirements. Current
query/service output reconstructed from source rows belongs in prose or
materialized views instead.
Regular indexes for query performance.
Primary key field (UUID).
Architectural role of this model, guiding API endpoint generation.
parentRelation and interface endpoint
design.mv_, and normal CRUD endpoints are not generated.Unique indexes for data integrity constraints.
A single Prisma model (database table).