Map<String, dynamic> toJson() { return { '_id': id, 'rewards': rewards.map((reward) => reward.toJson()).toList(), }; }