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.

49 lines
1.2KB

  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. String? tbEntityName;
  10. bool? isSelected;
  11. Supply({
  12. this.id,
  13. this.quantity,
  14. this.unit,
  15. this.tbWarehouseId,
  16. this.tbWarehouseName,
  17. this.tbSuppliesName,
  18. this.tbSuppliesId,
  19. this.tbEntityName,
  20. this.isSelected,
  21. });
  22. Supply.fromJson(Map<String, dynamic> json) {
  23. id = json['id'];
  24. quantity = json['quantity'];
  25. unit = json['unit'];
  26. tbWarehouseId = json['tbWarehouseId'];
  27. tbWarehouseName = json['tbWarehouseName'];
  28. tbEntityName = json['tbEntityName'];
  29. tbSuppliesName = json['tbSuppliesName'];
  30. tbSuppliesId = json['tbSuppliesId'];
  31. isSelected = false;
  32. }
  33. Map<String, dynamic> toJson() {
  34. final Map<String, dynamic> data = new Map<String, dynamic>();
  35. data['id'] = this.id;
  36. data['quantity'] = this.quantity;
  37. data['unit'] = this.unit;
  38. data['tbWarehouseId'] = this.tbWarehouseId;
  39. data['tbWarehouseName'] = this.tbWarehouseName;
  40. data['tbEntityName'] = this.tbEntityName;
  41. data['tbSuppliesName'] = this.tbSuppliesName;
  42. data['tbSuppliesId'] = this.tbSuppliesId;
  43. return data;
  44. }
  45. }