class Harvest { int id; int activityId; String executeDate; String description; num collectedQuantityLv1; num collectedQuantityLv2; num collectedQuantityLv3; num removedQuantity; Harvest( {this.id, this.activityId, this.executeDate, this.description, this.collectedQuantityLv1, this.collectedQuantityLv2, this.collectedQuantityLv3, this.removedQuantity}); Harvest.fromJson(Map json) { id = json['id']; activityId = json['activityId']; executeDate = json['executeDate']; description = json['description']; collectedQuantityLv1 = json['collectedQuantityLv1']; collectedQuantityLv2 = json['collectedQuantityLv2']; collectedQuantityLv3 = json['collectedQuantityLv3']; removedQuantity = json['removedQuantity']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['activityId'] = this.activityId; data['executeDate'] = this.executeDate; data['description'] = this.description; data['collectedQuantityLv1'] = this.collectedQuantityLv1; data['collectedQuantityLv2'] = this.collectedQuantityLv2; data['collectedQuantityLv3'] = this.collectedQuantityLv3; data['removedQuantity'] = this.removedQuantity; return data; } }