This commit is contained in:
PhyoThandar
2020-10-15 15:51:43 +06:30
9 changed files with 136 additions and 61 deletions

View File

@@ -1,12 +1,12 @@
class Discount {
String id;
String code;
String customer;
String customerId;
String customerName;
String status;
double amount;
int weight;
double discountRate;
<<<<<<< HEAD
Discount(
{this.id,
this.code,
@@ -15,4 +15,35 @@ class Discount {
this.status,
this.weight,
this.discountRate});
=======
Discount({
this.id,
this.code,
this.customerId,
this.customerName,
this.amount,
this.status,
});
Map<String, dynamic> toMap() {
return {
'id': id,
'code': code,
"customer_id": customerId,
"customer_name": customerName,
"amount": amount,
};
}
factory Discount.fromMap(Map<String, dynamic> map, String id) {
return Discount(
id: id,
code: map['code'],
customerId: map['customer_id'],
customerName: map['customer_name'],
amount: map['amount'],
status: map['status'],
);
}
>>>>>>> upstream/master
}