Order Overview
Core Relationships Diagram
User
Represents the customer account placing the order.
VipPackage
Defines the VIP subscription plan being purchased in the order. Referenced via the item polymorphic relationship on the Order model.
Order
Serves as the central model for managing VIP subscription purchase transactions. It links the User to the purchased VipPackage (as the item) and tracks the overall order status, payment details (including IAP info), and financial totals. Upon successful completion, it typically triggers the creation or update of a VipSubscription.
VipSubscription
Represents the user's access grant to VIP features, generated or updated as a result of a completed Order.