Ajoute la section Paramètres territoriaux avec CRUD Relais, modale de saisie structurée, états visuels harmonisés, et rattachement d'un relais principal aux gestionnaires via l'API. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
914 B
Dart
34 lines
914 B
Dart
class RelaisModel {
|
|
final String id;
|
|
final String nom;
|
|
final String adresse;
|
|
final Map<String, dynamic>? horairesOuverture;
|
|
final String? ligneFixe;
|
|
final bool actif;
|
|
final String? notes;
|
|
|
|
const RelaisModel({
|
|
required this.id,
|
|
required this.nom,
|
|
required this.adresse,
|
|
this.horairesOuverture,
|
|
this.ligneFixe,
|
|
required this.actif,
|
|
this.notes,
|
|
});
|
|
|
|
factory RelaisModel.fromJson(Map<String, dynamic> json) {
|
|
return RelaisModel(
|
|
id: (json['id'] ?? '').toString(),
|
|
nom: (json['nom'] ?? '').toString(),
|
|
adresse: (json['adresse'] ?? '').toString(),
|
|
horairesOuverture: json['horaires_ouverture'] is Map<String, dynamic>
|
|
? json['horaires_ouverture'] as Map<String, dynamic>
|
|
: null,
|
|
ligneFixe: json['ligne_fixe'] as String?,
|
|
actif: json['actif'] as bool? ?? true,
|
|
notes: json['notes'] as String?,
|
|
);
|
|
}
|
|
}
|