course-work/lib/models/order.g.dart
2022-12-27 08:45:05 +03:00

38 lines
1.4 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'order.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Order _$OrderFromJson(Map<String, dynamic> json) => Order(
title: json['title'] as String,
description: json['description'] as String,
id: json['id'] as int,
customerName: json['customer_name'] as String,
customerPhone: json['customer_phone'] as String,
orderDate: json['order_date'] as String,
deliveryDate: json['delivery_date'] as String,
address: json['address'] as String,
status: json['status'] as String,
courierId: json['courier_id'] as int,
items: (json['items'] as List<dynamic>)
.map((e) => Item.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$OrderToJson(Order instance) => <String, dynamic>{
'title': instance.title,
'description': instance.description,
'customer_name': instance.customerName,
'customer_phone': instance.customerPhone,
'order_date': instance.orderDate,
'delivery_date': instance.deliveryDate,
'address': instance.address,
'status': instance.status,
'id': instance.id,
'courier_id': instance.courierId,
'items': instance.items,
};