2020-10-07 02:33:06 +06:30
|
|
|
import 'package:fcs/domain/vo/shipment_status.dart';
|
2020-10-08 11:38:05 +06:30
|
|
|
import 'package:fcs/domain/vo/delivery_address.dart';
|
2020-06-04 01:36:49 +06:30
|
|
|
|
2020-10-07 02:33:06 +06:30
|
|
|
import 'cargo.dart';
|
|
|
|
|
import 'package.dart';
|
2020-06-04 01:36:49 +06:30
|
|
|
|
|
|
|
|
class Box {
|
|
|
|
|
String id;
|
|
|
|
|
String shipmentNumber;
|
|
|
|
|
String senderFCSID;
|
|
|
|
|
String senderName;
|
|
|
|
|
String receiverFCSID;
|
|
|
|
|
String receiverName;
|
|
|
|
|
String receiverAddress;
|
|
|
|
|
String receiverNumber;
|
|
|
|
|
String boxNumber;
|
|
|
|
|
String status;
|
|
|
|
|
String cargoDesc;
|
2020-06-25 16:19:23 +06:30
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
int length;
|
2020-06-29 16:15:25 +06:30
|
|
|
int shipmentWeight;
|
2020-06-04 01:36:49 +06:30
|
|
|
|
|
|
|
|
int rate;
|
|
|
|
|
int weight;
|
|
|
|
|
String packageType;
|
|
|
|
|
String pickUpID;
|
|
|
|
|
List<String> photos;
|
|
|
|
|
String remark;
|
|
|
|
|
DateTime arrivedDate;
|
|
|
|
|
|
|
|
|
|
List<Package> packages;
|
|
|
|
|
|
2020-06-25 16:19:23 +06:30
|
|
|
List<Cargo> cargoTypes;
|
|
|
|
|
|
2020-10-08 11:38:05 +06:30
|
|
|
DeliveryAddress shippingAddress;
|
2020-06-26 16:17:40 +06:30
|
|
|
|
2020-06-04 01:36:49 +06:30
|
|
|
int get amount => rate != null && weight != null ? rate * weight : 0;
|
|
|
|
|
|
|
|
|
|
String get packageNumber =>
|
|
|
|
|
shipmentNumber + "-" + receiverNumber + " #" + boxNumber;
|
|
|
|
|
double get price => rate.toDouble() * weight;
|
|
|
|
|
|
2020-10-07 02:33:06 +06:30
|
|
|
List<ShipmentStatus> shipmentHistory;
|
2020-06-04 01:36:49 +06:30
|
|
|
|
|
|
|
|
Box(
|
|
|
|
|
{this.id,
|
|
|
|
|
this.shipmentNumber,
|
|
|
|
|
this.senderFCSID,
|
|
|
|
|
this.senderName,
|
|
|
|
|
this.receiverFCSID,
|
|
|
|
|
this.receiverName,
|
|
|
|
|
this.receiverNumber,
|
|
|
|
|
this.receiverAddress,
|
|
|
|
|
this.boxNumber,
|
2020-06-25 16:19:23 +06:30
|
|
|
this.width,
|
|
|
|
|
this.height,
|
|
|
|
|
this.length,
|
2020-06-29 16:15:25 +06:30
|
|
|
this.shipmentWeight,
|
2020-06-04 01:36:49 +06:30
|
|
|
this.rate,
|
|
|
|
|
this.weight,
|
|
|
|
|
this.packageType,
|
|
|
|
|
this.pickUpID,
|
|
|
|
|
this.remark,
|
|
|
|
|
this.status,
|
|
|
|
|
this.arrivedDate,
|
|
|
|
|
this.cargoDesc,
|
2020-10-07 02:33:06 +06:30
|
|
|
this.shipmentHistory,
|
2020-06-25 16:19:23 +06:30
|
|
|
this.packages,
|
2020-06-26 16:17:40 +06:30
|
|
|
this.cargoTypes,
|
|
|
|
|
this.shippingAddress});
|
2020-06-04 01:36:49 +06:30
|
|
|
}
|