/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-10-19 15:05:24
 * @LastEditTime : 2023-05-15 15:42:02
 * @Description  : Do not edit
 */
class WorkModel {
  List<PatrolCleanOfWorkModelModel>? patrolClean;
  List<EquipmentOfWorkModelModel>? equipment;

  WorkModel({
    this.patrolClean,
    this.equipment,
  });

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

    patrolClean = List<PatrolCleanOfWorkModelModel>.from(
        (map["patrolClean"] ?? [])
            .map((x) => PatrolCleanOfWorkModelModel.fromJson(x)));
    equipment = List<EquipmentOfWorkModelModel>.from((map["equipment"] ?? [])
        .map((x) => EquipmentOfWorkModelModel.fromJson(x)));
  }

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

    json['patrolClean'] =
        List<dynamic>.from((patrolClean ?? []).map((x) => x.toJson()));
    json['equipment'] =
        List<dynamic>.from((equipment ?? []).map((x) => x.toJson()));

    return json;
  }
}

class PatrolCleanOfWorkModelModel {
  String? name;
  num? pointsNum;
  num? times;

  PatrolCleanOfWorkModelModel({
    this.name,
    this.pointsNum,
    this.times,
  });

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

    name = map['name'];
    pointsNum = map['pointsNum'];
    times = map['times'];
  }

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

    json['name'] = this.name;
    json['pointsNum'] = this.pointsNum;
    json['times'] = this.times;

    return json;
  }
}

class EquipmentOfWorkModelModel {
  String? name;
  num? number;

  EquipmentOfWorkModelModel({
    this.name,
    this.number,
  });

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

    name = map['name'];
    number = map['number'];
  }

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

    json['name'] = this.name;
    json['number'] = this.number;

    return json;
  }
}
