feat: Add Core Scheduling Module - #168
Merged
Merged
Conversation
Implements a polymorphic, reusable scheduling system for the Fleetbase platform. Database Schema (5 tables): - schedules: Master schedule records with polymorphic subject - schedule_items: Individual scheduled items with polymorphic assignee/resource - schedule_templates: Reusable schedule patterns with RRULE support - schedule_availability: Availability tracking for any entity - schedule_constraints: Configurable scheduling rules and constraints Models (5): - Schedule: Main schedule model with subject relationship - ScheduleItem: Schedule item with assignee and resource relationships - ScheduleTemplate: Template patterns for recurring schedules - ScheduleAvailability: Availability windows with RRULE support - ScheduleConstraint: Constraint definitions with priority Services (3): - ScheduleService: Core scheduling CRUD operations - AvailabilityService: Availability management and checking - ConstraintService: Pluggable constraint validation framework Events (7): - ScheduleCreated, ScheduleUpdated, ScheduleDeleted - ScheduleItemCreated, ScheduleItemUpdated, ScheduleItemDeleted, ScheduleItemAssigned - ScheduleConstraintViolated Controllers (5): - ScheduleController, ScheduleItemController - ScheduleTemplateController, ScheduleAvailabilityController - ScheduleConstraintController Features: - Polymorphic architecture allows scheduling any entity type - Pluggable constraint system for extension-specific rules - Event-driven architecture for extensibility - Activity logging via Spatie Activity Log - Support for recurring patterns via RRULE - Multi-timezone support API Endpoints: - /int/v1/schedules - /int/v1/schedule-items - /int/v1/schedule-templates - /int/v1/schedule-availability - /int/v1/schedule-constraints This module provides the foundation for FleetOps driver scheduling, Storefront delivery windows, Ledger payment schedules, and Pallet warehouse operations. See SCHEDULING_MODULE.md for detailed documentation and usage examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a polymorphic, reusable scheduling system for the Fleetbase platform.
Changes
Database Schema (5 tables)
Models (5)
Services (3)
Events (7)
Controllers (5)
Features
API Endpoints
/int/v1/schedules/int/v1/schedule-items/int/v1/schedule-templates/int/v1/schedule-availability/int/v1/schedule-constraintsUse Cases
This module provides the foundation for:
Documentation
See
SCHEDULING_MODULE.mdfor detailed documentation and usage examples.Testing
Related PRs