Order Overview
Core Relationships Diagram
Order
Serves as the central model for managing purchases and transactions. Contains order items and tracks the overall order status, payment details, and customer information.
OrderItem (Pivot)
Manages the items within an order through a polymorphic relationship. Can represent different purchasable items (courses, bundles, etc.) and tracks individual item details like pricing, discounts, and gift status.
OrderNote
Stores administrative notes and comments related to orders through a polymorphic relationship. Helps track order-specific information and communication.
Gift
Manages gift purchases. Links to orders and can create subscriptions when redeemed. Supports both known and unknown recipient scenarios.
Subscription
Tracks access rights to content (courses, ebooks). Can be created through direct purchases or gift redemptions. Manages expiration dates and subscription status.