ChallengeModel constructor
ChallengeModel({
- String? id,
- required String name,
- String? description,
- required ChallengeType type,
- required ChallengeStatus status,
- required DateTime startDate,
- required DateTime endDate,
- List<
ChallengeTaskModel> ? tasks, - List<
ChallengeRewardModel> ? communityRewards, - int totalCommunityXp = 0,
- int participantCount = 0,
- bool isJoined = false,
- int userXp = 0,
- int userRank = 0,
- DateTime? createdAt,
- DateTime? updatedAt,
Implementation
ChallengeModel({
this.id,
required this.name,
this.description,
required this.type,
required this.status,
required this.startDate,
required this.endDate,
this.tasks,
this.communityRewards,
this.totalCommunityXp = 0,
this.participantCount = 0,
this.isJoined = false,
this.userXp = 0,
this.userRank = 0,
this.createdAt,
this.updatedAt,
});