Map<String, dynamic> toMap() { return { "total": total, "logs": logs.map((p) => p.toMap()).toList(), }; }