add delivery address vo
This commit is contained in:
@@ -7,6 +7,7 @@ const markets_collection = "markets";
|
||||
const packages_collection = "packages";
|
||||
const messages_collection = "messages";
|
||||
const fcs_shipment_collection = "fcs_shipments";
|
||||
const delivery_address_collection = "delivery_addresses";
|
||||
|
||||
const user_requested_status = "requested";
|
||||
const user_invited_status = "invited";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:fcs/domain/vo/shipment_status.dart';
|
||||
import 'package:fcs/domain/vo/shipping_address.dart';
|
||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
|
||||
import 'cargo.dart';
|
||||
import 'package.dart';
|
||||
@@ -33,7 +33,7 @@ class Box {
|
||||
|
||||
List<Cargo> cargoTypes;
|
||||
|
||||
ShippingAddress shippingAddress;
|
||||
DeliveryAddress shippingAddress;
|
||||
|
||||
int get amount => rate != null && weight != null ? rate * weight : 0;
|
||||
|
||||
|
||||
31
lib/domain/vo/delivery_address.dart
Normal file
31
lib/domain/vo/delivery_address.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
class DeliveryAddress {
|
||||
String id;
|
||||
String fullName;
|
||||
String addressLine1;
|
||||
String addressLine2;
|
||||
String city;
|
||||
String state;
|
||||
String country;
|
||||
String phoneNumber;
|
||||
DeliveryAddress(
|
||||
{this.fullName,
|
||||
this.addressLine1,
|
||||
this.addressLine2,
|
||||
this.city,
|
||||
this.state,
|
||||
this.country,
|
||||
this.phoneNumber});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
"id": id,
|
||||
'full_name': fullName,
|
||||
'address_line1': addressLine1,
|
||||
'address_line2': addressLine2,
|
||||
'city': city,
|
||||
'state': state,
|
||||
'phone_number': phoneNumber,
|
||||
'contry': country,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
class ShippingAddress {
|
||||
String fullName;
|
||||
String addressLine1;
|
||||
String addressLine2;
|
||||
String city;
|
||||
String state;
|
||||
String phoneNumber;
|
||||
ShippingAddress(
|
||||
{this.fullName,
|
||||
this.addressLine1,
|
||||
this.addressLine2,
|
||||
this.city,
|
||||
this.state,
|
||||
this.phoneNumber});
|
||||
}
|
||||
Reference in New Issue
Block a user