Schedulable Resources & Composite Trees
Hierarchical resource modeling, parent-child composite booking rules, and capacity allocation.
Schedulable resources represent the atomic and composite physical assets available for reservation across facilities.
Composite Hierarchy Architecture
Visual representation of sports facility breakdown from physical campuses down to individual court sections.
Schedulable Resource Composite HierarchyText
Facility: Olympic Aquatic & Sports Center
├── Schedulable Resource [Id: res_pool_main] (Full 50m Olympic Pool)
│ ├── Sub-resource [res_lane_1] (Lane 1 - Speed)
│ ├── Sub-resource [res_lane_2] (Lane 2 - Speed)
│ └── Sub-resource [res_lane_3] (Lane 3 - Open Swim)
└── Schedulable Resource [res_arena_indoor] (Multi-purpose Stadium)
├── Partition [res_arena_half_a] (Basketball Court Alpha)
└── Partition [res_arena_half_b] (Basketball Court Beta)Schedulable Resource Tree Model
Atomic and composite physical resources arranged in parent-child reservation trees.
src/Modules/Venue/Venue.Domain/Entities/SchedulableResource.csC#
public sealed class SchedulableResource : TenantAggregateRoot
{
public Guid FacilityId { get; private set; }
public Guid? ParentResourceId { get; private set; }
public string Name { get; private set; } = string.Empty;
public string KindCode { get; private set; } = string.Empty;
public int Capacity { get; private set; }
public bool IsComposite { get; private set; }
public PublicationStatus PublicationStatus { get; private set; }
public TimeZoneInfo FacilityTimeZone { get; private set; } = TimeZoneInfo.Utc;
public Result Publish(PublicationChecklist checklist)
{
if (!checklist.HasOperatingHours || !checklist.HasRateCard)
return Result.Failure("Cannot publish resource without active hours and pricing.");
PublicationStatus = PublicationStatus.Published;
RaiseDomainEvent(new SchedulableResourcePublishedDomainEvent(Id, TenantId, FacilityId));
return Result.Success();
}
}Publication Readiness Checklist
Verify pricing, operating hours, and capacity settings before activating resources.
Resource Management APIs
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /api/v1/venue/schedulable-resources | List schedulable assets for a facility with capacity filters | 🔒 Required |
| POST | /api/v1/venue/schedulable-resources | Register a new atomic or composite schedulable resource | 🔒 Required |
| POST | /api/v1/venue/schedulable-resources/{id}/publish | Publish resource for public booking | 🔒 Required |