v3
This commit is contained in:
61
lib/vo/box.dart
Normal file
61
lib/vo/box.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'package.dart';
|
||||
|
||||
class Status {
|
||||
String status;
|
||||
DateTime date;
|
||||
bool done;
|
||||
Status({this.status, this.date, this.done});
|
||||
}
|
||||
|
||||
class Box {
|
||||
String id;
|
||||
String shipmentNumber;
|
||||
String senderFCSID;
|
||||
String senderName;
|
||||
String receiverFCSID;
|
||||
String receiverName;
|
||||
String receiverAddress;
|
||||
String receiverNumber;
|
||||
String boxNumber;
|
||||
String status;
|
||||
String cargoDesc;
|
||||
|
||||
int rate;
|
||||
int weight;
|
||||
String packageType;
|
||||
String pickUpID;
|
||||
List<String> photos;
|
||||
String remark;
|
||||
DateTime arrivedDate;
|
||||
|
||||
List<Package> packages;
|
||||
|
||||
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;
|
||||
|
||||
Box(
|
||||
{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.statusHistory,
|
||||
this.packages});
|
||||
}
|
||||
Reference in New Issue
Block a user