You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1KB

  1. class Supply {
  2. int id;
  3. num quantity;
  4. String unit;
  5. int tbWarehouseId;
  6. String tbWarehouseName;
  7. String tbSuppliesName;
  8. int tbSuppliesId;
  9. bool isSelected;
  10. Supply(
  11. {this.id,
  12. this.quantity,
  13. this.unit,
  14. this.tbWarehouseId,
  15. this.tbWarehouseName,
  16. this.tbSuppliesName,
  17. this.tbSuppliesId,
  18. this.isSelected});
  19. Supply.fromJson(Map<String, dynamic> json) {
  20. id = json['id'];
  21. quantity = json['quantity'];
  22. unit = json['unit'];
  23. tbWarehouseId = json['tbWarehouseId'];
  24. tbWarehouseName = json['tbWarehouseName'];
  25. tbSuppliesName = json['tbSuppliesName'];
  26. tbSuppliesId = json['tbSuppliesId'];
  27. isSelected = false;
  28. }
  29. Map<String, dynamic> toJson() {
  30. final Map<String, dynamic> data = new Map<String, dynamic>();
  31. data['id'] = this.id;
  32. data['quantity'] = this.quantity;
  33. data['unit'] = this.unit;
  34. data['tbWarehouseId'] = this.tbWarehouseId;
  35. data['tbWarehouseName'] = this.tbWarehouseName;
  36. data['tbSuppliesName'] = this.tbSuppliesName;
  37. data['tbSuppliesId'] = this.tbSuppliesId;
  38. return data;
  39. }
  40. }