pub struct Fact { /* private fields */ }Expand description
Source-backed service-demand fact for labor planning and exception reporting.
Implementations§
Source§impl Fact
impl Fact
Sourcepub fn try_new(
id: Id,
operating_day: Key,
demand_units: DemandUnits,
source_record_refs: Vec<RecordRef>,
projection_version: ProjectionVersion,
data_quality_issues: Vec<Issue>,
) -> Result<Self>
pub fn try_new( id: Id, operating_day: Key, demand_units: DemandUnits, source_record_refs: Vec<RecordRef>, projection_version: ProjectionVersion, data_quality_issues: Vec<Issue>, ) -> Result<Self>
Builds a service-demand fact only when source records prove the booked work being counted.
Sourcepub const fn id(&self) -> &Id
pub const fn id(&self) -> &Id
Returns the analytics fact id used to join reports without reusing provider record ids.
Sourcepub const fn operating_day(&self) -> &Key
pub const fn operating_day(&self) -> &Key
Returns the resort/service/day bucket used to compare demand with staffing and capacity.
Sourcepub const fn demand_units(&self) -> DemandUnits
pub const fn demand_units(&self) -> DemandUnits
Returns the booked work units that drive labor planning and exception ranking.
Sourcepub fn source_record_refs(&self) -> &[RecordRef]
pub fn source_record_refs(&self) -> &[RecordRef]
Returns the source records that justify the demand units before labor reports rely on them.
Sourcepub const fn projection_version(&self) -> &ProjectionVersion
pub const fn projection_version(&self) -> &ProjectionVersion
Returns the projection version so dashboards compare facts produced by the same logic.
Sourcepub const fn data_quality_status(&self) -> DataQualityStatus
pub const fn data_quality_status(&self) -> DataQualityStatus
Returns whether the fact is clean or still needs manager-visible data-quality review.
Sourcepub fn data_quality_issues(&self) -> &[Issue]
pub fn data_quality_issues(&self) -> &[Issue]
Returns nonblocking hygiene findings that explain why demand evidence may need manager review.