Map<String, dynamic> toMap() { return { 'total_items': totalItems, 'items': items?.map((x) => x.toMap()).toList(), }; }