Skip to main content

domain/
portal.rs

1//! Customer-portal identifiers imported from external systems such as Gingr.
2//!
3//! Portal ids are source facts, not internal authority by themselves: downstream domain
4//! workflows must validate and join them to customer/pet/location records before using
5//! them for labor planning, customer communication, or read models.
6
7use nutype::nutype;
8#[allow(unused_imports)]
9use serde::{Deserialize, Serialize};
10
11#[nutype(
12    sanitize(trim),
13    validate(not_empty, len_char_max = 120),
14    derive(
15        Debug,
16        Clone,
17        PartialEq,
18        Eq,
19        PartialOrd,
20        Ord,
21        Hash,
22        Serialize,
23        Deserialize
24    )
25)]
26/// External customer-portal identifier retained for source lineage and joins.
27pub struct CustomerId(String);