Initial commit: app Fideliter client (Flutter)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/// Une récompense du catalogue que le client peut viser avec ses points.
|
||||
class Recompense {
|
||||
final String id;
|
||||
final String nom;
|
||||
final double coutPoints;
|
||||
final bool actif;
|
||||
|
||||
const Recompense({
|
||||
required this.id,
|
||||
required this.nom,
|
||||
required this.coutPoints,
|
||||
this.actif = true,
|
||||
});
|
||||
|
||||
factory Recompense.fromMap(Map<String, dynamic> map) {
|
||||
return Recompense(
|
||||
id: map['id'].toString(),
|
||||
nom: (map['nom'] as String?) ?? '',
|
||||
coutPoints: (map['cout_points'] as num?)?.toDouble() ?? 0,
|
||||
actif: (map['actif'] as bool?) ?? true,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user