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