add cartonsize api

This commit is contained in:
2020-12-03 17:21:59 +06:30
parent 3b9a098e8a
commit af28300222
3 changed files with 61 additions and 12 deletions

View File

@@ -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";

View File

@@ -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'],
);
}
}