Skip to main content

domain/
pet.rs

1//! Pet identity values shared by reservations, care notes, and safety checks.
2//!
3//! Pet names are human-facing labels used in staff handoffs, customer messages, and manager
4//! briefings. Safety-critical facts such as species, temperament, vaccines, and medications live
5//! in the richer domain records that reference this value.
6
7use nutype::nutype;
8#[allow(unused_imports)]
9use serde::{Deserialize, Serialize};
10
11/// Pet display name from the customer portal, staff intake, or imported operating record.
12///
13/// A non-empty bounded name keeps generated care packets and customer drafts intelligible while
14/// avoiding blank labels that would force staff to reconcile records manually.
15#[nutype(
16    sanitize(trim),
17    validate(not_empty, len_char_max = 80),
18    derive(
19        Debug,
20        Clone,
21        PartialEq,
22        Eq,
23        PartialOrd,
24        Ord,
25        Hash,
26        Serialize,
27        Deserialize
28    )
29)]
30pub struct Name(String);