Map<String, dynamic> toJson() { return { 'id': id, 'location': locations.map((loc) => "${loc.latitude},${loc.longitude}").toList(), }; }