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.

54 lines
1.3KB

  1. import '../../../../custom_model/TbCropDTO.dart';
  2. class Stamp {
  3. int? id;
  4. TbCropDTO? tbCropDTO;
  5. String? code;
  6. num? quantity;
  7. String? description;
  8. String? pathImage;
  9. String? status;
  10. String? expiredDate;
  11. String? createdDate;
  12. Stamp({
  13. this.id,
  14. this.tbCropDTO,
  15. this.code,
  16. this.quantity,
  17. this.description,
  18. this.pathImage,
  19. this.status,
  20. this.expiredDate,
  21. this.createdDate,
  22. });
  23. Stamp.fromJson(Map<String, dynamic> json) {
  24. id = json['id'];
  25. tbCropDTO = json['TbCropDTO'] != null ? new TbCropDTO.fromJson(json['TbCropDTO']) : null;
  26. code = json['code'];
  27. quantity = json['quantity'];
  28. description = json['description'];
  29. pathImage = json['pathImage'];
  30. status = json['status'];
  31. expiredDate = json['expiredDate'];
  32. createdDate = json['createdDate'];
  33. }
  34. Map<String, dynamic> toJson() {
  35. final Map<String, dynamic> data = new Map<String, dynamic>();
  36. data['id'] = this.id;
  37. if (this.tbCropDTO != null) {
  38. data['TbCropDTO'] = this.tbCropDTO?.toJson();
  39. }
  40. data['code'] = this.code;
  41. data['quantity'] = this.quantity;
  42. data['description'] = this.description;
  43. data['pathImage'] = this.pathImage;
  44. data['status'] = this.status;
  45. data['expiredDate'] = this.expiredDate;
  46. data['createdDate'] = this.createdDate;
  47. return data;
  48. }
  49. }