|
- import 'SuppliesUsing.dart';
-
- class HarvestProcess {
- int id;
- int cropId;
- int activityId;
- int harvestId;
- String executeDate;
- String description;
- String executeBy;
- String media;
- List<String> mediaDel;
- num quantityLv1;
- num quantityLv2;
- num quantityLv3;
- num removedQuantity;
- List<SuppliesUsing> suppliesUsing;
-
- HarvestProcess(
- {this.id,
- this.cropId,
- this.activityId,
- this.harvestId,
- this.executeDate,
- this.description,
- this.executeBy,
- this.media,
- this.mediaDel,
- this.quantityLv1,
- this.quantityLv2,
- this.quantityLv3,
- this.removedQuantity,
- this.suppliesUsing});
-
- HarvestProcess.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- cropId = json['cropId'];
- activityId = json['activityId'];
- harvestId = json['harvestId'];
- executeDate = json['executeDate'];
- description = json['description'];
- executeBy = json['executeBy'];
- media = json['media'];
- quantityLv1 = json['quantityLv1'];
- quantityLv2 = json['quantityLv2'];
- quantityLv3 = json['quantityLv3'];
- removedQuantity = json['removedQuantity'];
- if (json['suppliesUsing'] != null) {
- suppliesUsing = new List<SuppliesUsing>();
- json['suppliesUsing'].forEach((v) {
- suppliesUsing.add(new SuppliesUsing.fromJson(v));
- });
- }
- }
-
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = this.id;
- data['cropId'] = this.cropId;
- data['activityId'] = this.activityId;
- data['harvestId'] = this.harvestId;
- data['executeDate'] = this.executeDate;
- data['description'] = this.description;
- data['executeBy'] = this.executeBy;
- data['media'] = this.media;
- data['media_del'] = this.mediaDel;
- data['quantityLv1'] = this.quantityLv1;
- data['quantityLv2'] = this.quantityLv2;
- data['quantityLv3'] = this.quantityLv3;
- data['removedQuantity'] = this.removedQuantity;
- if (this.suppliesUsing != null) {
- data['suppliesUsing'] =
- this.suppliesUsing.map((v) => v.toJson()).toList();
- }
- return data;
- }
- }
|