Expand description
Database entity definitions and query functions.
This module contains the data model for every entity stored in the SQLite database.
Each sub-module corresponds to one table and owns the query functions that operate
on that table. All query functions accept a [sqlx::SqlitePool] reference rather than
taking ownership, so they can be called freely from any async context.
§Sub-modules
asset— Theassetstable. Tracks which users own which blobs (CAS hashes). Implements reference-counted deletion: the physical file is only removed when the last ownership row is deleted.session— Thesessionstable. Manages opaque session tokens with a 30-day TTL.user— Theuserstable. Stores hashed identities and authentication verifiers.error— Themodel::Errortype covering all database-layer failures.