Skip to main content

storage/
lib.rs

1//! Storage adapter rules for pet-resort domain models.
2//!
3//! # Operator framing
4//!
5//! Use this crate page when you need to know what gets persisted for reports,
6//! fixtures, projections, or read models after source facts have been promoted
7//! into the NVA domain language. It matters to operators because stored records
8//! can support audits, manager briefs, and workflow evidence, but they are not
9//! themselves approval to change reservations, send messages, collect payments,
10//! or repair provider data.
11//!
12//! The next step is to open `service_line` for boarding/daycare/grooming/etc.
13//! record projections or `operations` for shared codec and record-kind rules.
14//! The public framing explains storage's role; the public Rustdoc below keeps
15//! the API details for implementers.
16//!
17//! `domain` owns the NVA pet-resort language: service lines, portfolio facts,
18//! workflow gates, source evidence, and labor-saving outcomes. This crate owns
19//! the persistence projection of that language: stable storage codes, JSON
20//! codecs, flattened records shaped for databases and fixtures, and explicit
21//! promotion/demotion between storage records and core domain types.
22//!
23//! Storage code is intentionally not the business model. It may preserve source
24//! system vocabulary such as Gingr record identifiers, provider codes, and
25//! serialized DTO shapes, but application and domain layers must promote those
26//! facts into semantic domain values before using them to approve customer
27//! messages, manager actions, labor evidence, or data-quality repairs.
28//!
29//! Crosswalk navigation: this crate is the persistence/projection step, not the
30//! entry or workflow authority. Use
31//! `docs/entity-atlas/contract-crosswalk/storage-persistence.md` to see which
32//! entities have storage records, which are intentionally not persisted, and
33//! which source/Rustdoc/test links prove the projection boundary.
34
35pub mod operations;
36pub mod service_line;
37
38pub use operations::{CodecError, RecordKind, Result};