Initial draft
This commit is contained in:
19
lib/dto/car_get_response.dart
Normal file
19
lib/dto/car_get_response.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'car.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'car_get_response.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class CarGetResponseDTO {
|
||||
CarGetResponseDTO(
|
||||
{required this.succeeded,
|
||||
required this.message,
|
||||
required this.cars});
|
||||
|
||||
final bool succeeded;
|
||||
final String message;
|
||||
final List<CarDTO>? cars;
|
||||
|
||||
factory CarGetResponseDTO.fromJson(Map<String, dynamic> json) => _$CarGetResponseDTOFromJson(json);
|
||||
Map<dynamic, dynamic> toJson() => _$CarGetResponseDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user