/*
 * @Author: XianKaiQun
 * @Date: 2020-08-03 10:01:33
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-08-03 10:03:56
 * @Description: 
 */
class RepairPlanModel {
  String? location;
  num? count;
  List<PlanInfoListOfRepairPlanModel>? planInfoList;

  RepairPlanModel({
    this.location,
    this.count,
    this.planInfoList,
  });

  RepairPlanModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    location = map['location'];
    count = map['count'];
    planInfoList = List<PlanInfoListOfRepairPlanModel>.from(
        (map["planInfoList"] ?? [])
            .map((x) => PlanInfoListOfRepairPlanModel.fromJson(x)));
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['location'] = this.location;
    json['count'] = this.count;
    json['planInfoList'] =
        List<dynamic>.from((planInfoList ?? []).map((x) => x.toJson()));

    return json;
  }
}

class PlanInfoListOfRepairPlanModel {
  String? id;
  String? equipmentName;
  String? equipmentId;
  String? date;
  String? location;
  String? createdAt;

  PlanInfoListOfRepairPlanModel({
    this.id,
    this.equipmentName,
    this.equipmentId,
    this.date,
    this.location,
    this.createdAt,
  });

  PlanInfoListOfRepairPlanModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    id = map['id'];
    equipmentName = map['equipmentName'];
    equipmentId = map['equipmentId'];
    date = map['date'];
    location = map['location'];
    createdAt = map['createdAt'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['id'] = this.id;
    json['equipmentName'] = this.equipmentName;
    json['equipmentId'] = this.equipmentId;
    json['date'] = this.date;
    json['location'] = this.location;
    json['createdAt'] = this.createdAt;

    return json;
  }
}
