Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:fcs/domain/entities/discount_by_weight.dart';
|
||||
import 'package:fcs/domain/entities/rate.dart';
|
||||
import 'package:fcs/domain/vo/shipment_status.dart';
|
||||
@@ -109,8 +110,8 @@ class Box {
|
||||
this.cartonType,
|
||||
this.fcsID,
|
||||
this.userName,
|
||||
this.rate,
|
||||
this.weight,
|
||||
this.rate = 0,
|
||||
this.weight = 0,
|
||||
this.packageType,
|
||||
this.pickUpID,
|
||||
this.remark,
|
||||
@@ -133,4 +134,21 @@ class Box {
|
||||
'delivery_address': deliveryAddress.toMap(),
|
||||
};
|
||||
}
|
||||
|
||||
factory Box.fromMap(Map<String, dynamic> map, String docID) {
|
||||
var _arrivedDate = (map['arrived_date'] as Timestamp);
|
||||
|
||||
return Box(
|
||||
id: docID,
|
||||
arrivedDate: _arrivedDate != null ? _arrivedDate.toDate() : null,
|
||||
shipmentNumber: map['shipment_number'],
|
||||
receiverNumber: map['receiver_number'],
|
||||
boxNumber: map['box_number'],
|
||||
length: map['length'],
|
||||
width: map['width'],
|
||||
height: map['height'],
|
||||
userName: map['user_name'],
|
||||
fcsID: map['fcs_id'],
|
||||
cartonType: map['carton_type']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user