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);
}
