add cartonsize api
This commit is contained in:
@@ -5,6 +5,8 @@ const user_collection = "users";
|
||||
const invitations_collection = "invitations";
|
||||
const privilege_collection = "privileges";
|
||||
const markets_collection = "markets";
|
||||
const carton_sizes_collection = "carton_sizes";
|
||||
|
||||
const packages_collection = "packages";
|
||||
const messages_collection = "messages";
|
||||
const fcs_shipment_collection = "fcs_shipments";
|
||||
|
||||
@@ -5,4 +5,26 @@ class CartonSize {
|
||||
double width;
|
||||
double height;
|
||||
CartonSize({this.id, this.name, this.length, this.width, this.height});
|
||||
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'length': length,
|
||||
'width': width,
|
||||
'height': height,
|
||||
};
|
||||
}
|
||||
|
||||
factory CartonSize.fromMap(Map<String, dynamic> map, String id) {
|
||||
return CartonSize(
|
||||
id: id,
|
||||
name: map['name'],
|
||||
length: map['length'],
|
||||
width: map['width'],
|
||||
height: map['height'],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user