Files
fcs/lib/vo/package.dart
2020-06-24 16:06:15 +06:30

56 lines
1.1 KiB
Dart

import 'box.dart';
class Package {
String id;
String shipmentNumber;
String senderFCSID;
String senderName;
String receiverFCSID;
String receiverName;
String receiverAddress;
String receiverNumber;
String boxNumber;
String status;
String cargoDesc;
String market;
String trackingID;
int rate;
int weight;
String packageType;
String pickUpID;
List<String> photos;
String remark;
DateTime arrivedDate;
int get amount => rate != null && weight != null ? rate * weight : 0;
String get packageNumber =>
shipmentNumber + "-" + receiverNumber + " #" + boxNumber;
double get price => rate.toDouble() * weight;
List<Status> statusHistory;
Package(
{this.id,
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.trackingID,
this.statusHistory});
}