Add ReportRequestBody model with JSON serialization

This commit introduces a new Dart class, `ReportRequestBody`, which represents the request body for generating reports in the `BenchmarkService`. The class includes a `toJson` method for easy serialization to JSON format.

- `category`: Specifies the category of the report (e.g., "coding").
- `tests`: A list of tests to be included in the report.
This commit is contained in:
hunteraraujo
2023-09-14 20:01:05 -07:00
parent a1284336ba
commit 8e25cd2391

View File

@@ -0,0 +1,13 @@
class ReportRequestBody {
final String category;
final List<String> tests;
ReportRequestBody({required this.category, required this.tests});
Map<String, dynamic> toJson() {
return {
'category': category,
'tests': tests,
};
}
}