class WorkspaceModel { final String id; final String createdAt; final String updatedAt; final bool deleted; final String name; final String description; final String phone; final String email; WorkspaceModel({ required this.id, required this.createdAt, required this.updatedAt, required this.deleted, required this.name, required this.description, required this.phone, required this.email, }); factory WorkspaceModel.fromJson(Map json) { return WorkspaceModel( id: json['id'] as String, createdAt: json['createdAt'] as String, updatedAt: json['updatedAt'] as String, deleted: json['deleted'] as bool, name: json['name'] as String, description: json['description'] as String, phone: json['phone'] as String, email: json['email'] as String, ); } Map toJson() { return { 'id': id, 'createdAt': createdAt, 'updatedAt': updatedAt, 'deleted': deleted, 'name': name, 'description': description, 'phone': phone, 'email': email, }; } }