Daily commit
This commit is contained in:
20
lib/dto/delivery_dto.dart
Normal file
20
lib/dto/delivery_dto.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'car_dto.dart';
|
||||
|
||||
part 'delivery_dto.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class DeliveryDTO {
|
||||
@JsonKey(name: 'amount_deliveries')
|
||||
final int amountDeliveries;
|
||||
|
||||
final CarDTO car;
|
||||
|
||||
DeliveryDTO({
|
||||
required this.amountDeliveries,
|
||||
required this.car,
|
||||
});
|
||||
|
||||
factory DeliveryDTO.fromJson(Map<String, dynamic> json) => _$DeliveryDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$DeliveryDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user