toJson method
Implementation
Map<String, dynamic> toJson() => {
"_id": id,
"created_at": createdAt.toIso8601String(),
"points": points,
if (prizeName != null) "prize_name": prizeName,
if (code != null) "code": code,
if (state != null) "state": state,
};