/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-07-01 09:46:38
 * @LastEditTime : 2023-02-09 16:50:36
 * @Description  : Do not edit
 */
class DealPeasonModel {
  String? id;
  String? name;
  String? type;
  String? phone;
  List<ChildOfDealPeasonModel>? child;

  DealPeasonModel({
    this.id,
    this.name,
    this.type,
    this.phone,
    this.child,
  });

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

    id = map['id'];
    name = map['name'];
    type = map['type'];
    phone = map['phone'];
    child = List<ChildOfDealPeasonModel>.from(
        (map["child"] ?? []).map((x) => ChildOfDealPeasonModel.fromJson(x)));
  }

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

    json['id'] = this.id;
    json['name'] = this.name;
    json['type'] = this.type;
    json['phone'] = this.phone;
    json['child'] = List<dynamic>.from((child ?? []).map((x) => x.toJson()));

    return json;
  }
}

class ChildOfDealPeasonModel {
  String? id;
  String? name;
  String? type;
  String? phone;

  ChildOfDealPeasonModel({
    this.id,
    this.name,
    this.type,
    this.phone,
  });

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

    id = map['id'];
    name = map['name'];
    type = map['type'];
    phone = map['phone'];
  }

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

    json['id'] = this.id;
    json['name'] = this.name;
    json['type'] = this.type;
    json['phone'] = this.phone;

    return json;
  }
}
