first commit
This commit is contained in:
25
lib/modules/product/discount.dart
Normal file
25
lib/modules/product/discount.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class Discount {
|
||||
final int discountid;
|
||||
final String discountname;
|
||||
final String discountcode;
|
||||
final String discountterms;
|
||||
final double discountvalue;
|
||||
|
||||
Discount({
|
||||
required this.discountid,
|
||||
required this.discountname,
|
||||
required this.discountcode,
|
||||
required this.discountterms,
|
||||
required this.discountvalue,
|
||||
});
|
||||
|
||||
factory Discount.fromJson(Map<String, dynamic> json) {
|
||||
return Discount(
|
||||
discountid: json['discountid'],
|
||||
discountname: json['discountname'],
|
||||
discountcode: json['discountcode'],
|
||||
discountterms: json['discountterms'],
|
||||
discountvalue: (json['discountvalue'] ?? 0).toDouble(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user