Challenge Overview
Core Relationships Diagram
Challenge
The main model representing a challenge available to users. Contains localized names and descriptions, activation status (is_active), VIP status (is_vip), and whether statistics are visible (has_visible_statistics). It serves as the central point connecting questions, user progress logs, and notifications related to the challenge.
ChallengeQuestion
Stores the individual questions associated with a specific Challenge. Contains localized question text.
ChallengeLog
Records a user's progress and answers for a specific ChallengeQuestion within the context of their Subscription to the challenge.
ChallengeNotification
Stores scheduled notification messages specifically designed for a Challenge, often triggered based on the number of days into the challenge.
Subscription
A polymorphic model that tracks a user's enrollment or subscription status to different features. In this context, it links a User to a specific Challenge (as the subscribable item).
NotificationTemplate
Defines reusable templates for notifications. Can be linked polymorphically (typeable) to a Challenge to trigger specific notifications based on challenge events or progress.