Skip to main content

domain/
location.rs

1//! Resort-location values used to scope policies, schedules, labor, and source data.
2//!
3//! Location labels and time zones are source-of-truth facts for multi-site automation. They keep
4//! manager briefings, reservation windows, and labor-cost reports tied to the correct resort rather
5//! than relying on loose strings from individual systems.
6
7use nutype::nutype;
8#[allow(unused_imports)]
9use serde::{Deserialize, Serialize};
10
11/// Display name for a resort location or brand-specific site.
12///
13/// This is the human-readable location label used in manager briefings, audit events, and staff
14/// workflows across the 170-location portfolio.
15#[nutype(
16    sanitize(trim),
17    validate(not_empty, len_char_max = 120),
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);
31
32/// IANA-style or provider-supplied timezone identifier for a resort location.
33///
34/// Timezone is part of the safety boundary for reminders, check-in windows, daily briefings, and
35/// labor reporting; adapters should validate provider-specific semantics before relying on it for
36/// live scheduling actions.
37#[nutype(
38    sanitize(trim),
39    validate(not_empty, len_char_max = 80),
40    derive(
41        Debug,
42        Clone,
43        PartialEq,
44        Eq,
45        PartialOrd,
46        Ord,
47        Hash,
48        Serialize,
49        Deserialize
50    )
51)]
52pub struct Timezone(String);