Map<String, dynamic> toJson() { return { 'categories': categories == null ? null : categories!.map((e) => e.toJson()).toList(), }; }