pub async fn send(
db: &Db,
user_id: i64,
message: &str,
url: &str,
) -> Result<i64>Expand description
Persist one notification targeted at user_id. url may be
empty when the message stands on its own (no click-through).
Returns the new row’s id on success.
Project code calls this anywhere a Db is in scope — request
handlers, background jobs, periodic tasks. The framework’s
own audit pipeline does not emit notifications today; this
is a project-facing surface.