domain capa

domain-scheduling

Time-based scheduling, availability, and appointment management

Time-based scheduling, availability, and appointment management

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/scheduling
Edition2021
Targetsdomain_scheduling
Public items0 across 0 modules
Tests83

What it is for

domain-scheduling: Time-based scheduling, availability, and appointment management

Overview

This crate provides scheduling capabilities including availability management, time slots, and appointment booking with conflict detection and exception handling.

Layer

Domain - depends on: foundation-basemodels

Key Concepts

Key Types

Example

use domain_scheduling::{
SchedulingService, CreateScheduleRequest, CreateAppointmentRequest
};
use chrono::{Duration, Utc, Weekday, NaiveTime};

let service = SchedulingService::new(pool);

// Create a schedule
let (schedule, event) = service.create_schedule(CreateScheduleRequest {
tenant_id,
name: "Office Hours".to_string(),
default_duration_minutes: Some(30),
..Default::default()
}).await?;

// Add availability (Mon-Fri 9am-5pm)
let start = NaiveTime::from_hms_opt(9, 0, 0).unwrap();
let end = NaiveTime::from_hms_opt(17, 0, 0).unwrap();
service.add_availability(tenant_id, schedule.id, Weekday::Mon, start, end).await?;

// Book an appointment
let (appointment, events) = service.create_appointment(CreateAppointmentRequest {
tenant_id,
schedule_id: schedule.id,
party_id: user_id,
starts_at: Utc::now() + Duration::days(1),
ends_at: Utc::now() + Duration::days(1) + Duration::hours(1),
..Default::default()
}).await?;

println!("Confirmation: {}", appointment.confirmation_code);

Capabilities

No public items.

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into foundation.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/scheduling
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
chrono^0.4serdenoalways
serde^1derivenoalways
serde_json^1noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
thiserror^2noalways
uuid^1v4, serdenoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1full, test-utilnoalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_scheduling["application-scheduling"] -->|uses| SELF
  SELF["domain-scheduling"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libdomain_scheduling`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: application-scheduling.

Verification

KindCount
Unit tests83
Integration tests0
Examples0
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files6
Source lines3994
Code lines3285
Public API items0
Public modules0
Tests83
Examples0
Cargo features0
Direct runtime dependencies8
Workspace reverse dependencies1
pie showData
    title Rust source composition
    "Code" : 3285
    "Blank or comment" : 709

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las domain · Manual