Map<String, dynamic> toJson() => {'stocktake': stocktake.toJson(), 'warnings': [for (final w in warnings) w.toJson()]};