systemprompt_identifiers/user.rs
1//! User identifier.
2//!
3//! Every `UserId` must originate from a row in the `users` table. The
4//! request middleware persists an anonymous user before constructing a
5//! request context (see `SessionCreationService::ensure_anonymous_user`);
6//! handlers that need a `UserId` for an FK write call the provider rather
7//! than fabricate one.
8//!
9//! Copyright (c) systemprompt.io — Business Source License 1.1.
10//! See <https://systemprompt.io> for licensing details.
11
12crate::define_id!(UserId, schema);