Description:
Users who refer new students should earn BST tokens.
Tasks:
- Add
referralCode: string (unique, auto-generated) to User entity
- Add
referredBy: string (nullable FK to User) to User entity
- On registration with a valid
?ref=CODE, set referredBy
- When the referred user completes their first course, mint 50 BST to the referrer via the Token contract
- Add
GET /users/:id/referrals endpoint showing referral count and earned BST
- Add referral link sharing UI to the profile page