update processing
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
import 'package:fcs/domain/vo/shipment_status.dart';
|
||||
@@ -36,42 +38,47 @@ class Package {
|
||||
DateTime arrivedDate;
|
||||
DeliveryAddress deliveryAddress;
|
||||
|
||||
//for packages in processing
|
||||
List<File> photoFiles;
|
||||
|
||||
int get amount => rate != null && weight != null ? rate * weight : 0;
|
||||
|
||||
String get packageNumber =>
|
||||
shipmentNumber + "-" + receiverNumber + " #" + boxNumber;
|
||||
double get price => rate.toDouble() * weight;
|
||||
|
||||
Package(
|
||||
{this.id,
|
||||
this.trackingID,
|
||||
this.userID,
|
||||
this.userName,
|
||||
this.fcsID,
|
||||
this.phoneNumber,
|
||||
this.shipmentNumber,
|
||||
this.senderFCSID,
|
||||
this.senderName,
|
||||
this.receiverFCSID,
|
||||
this.receiverName,
|
||||
this.receiverNumber,
|
||||
this.receiverAddress,
|
||||
this.boxNumber,
|
||||
this.rate,
|
||||
this.weight,
|
||||
this.packageType,
|
||||
this.pickUpID,
|
||||
this.remark,
|
||||
this.status,
|
||||
this.arrivedDate,
|
||||
this.cargoDesc,
|
||||
this.market,
|
||||
this.shipmentHistory,
|
||||
this.currentStatusDate,
|
||||
this.photoUrls,
|
||||
this.desc,
|
||||
this.deliveryAddress,
|
||||
this.isChecked = false});
|
||||
Package({
|
||||
this.id,
|
||||
this.trackingID,
|
||||
this.userID,
|
||||
this.userName,
|
||||
this.fcsID,
|
||||
this.phoneNumber,
|
||||
this.shipmentNumber,
|
||||
this.senderFCSID,
|
||||
this.senderName,
|
||||
this.receiverFCSID,
|
||||
this.receiverName,
|
||||
this.receiverNumber,
|
||||
this.receiverAddress,
|
||||
this.boxNumber,
|
||||
this.rate,
|
||||
this.weight,
|
||||
this.packageType,
|
||||
this.pickUpID,
|
||||
this.remark,
|
||||
this.status,
|
||||
this.arrivedDate,
|
||||
this.cargoDesc,
|
||||
this.market,
|
||||
this.shipmentHistory,
|
||||
this.currentStatusDate,
|
||||
this.photoUrls,
|
||||
this.desc,
|
||||
this.deliveryAddress,
|
||||
this.isChecked = false,
|
||||
this.photoFiles,
|
||||
});
|
||||
|
||||
factory Package.fromMap(Map<String, dynamic> map, String docID) {
|
||||
var _currentStatusDate = (map['status_date'] as Timestamp);
|
||||
|
||||
Reference in New Issue
Block a user