/*
 * @Author       : WuWei
 * @LastEditors: ChenYaJin
 * @Date         : 2022-03-31 17:00:03
 * @LastEditTime: 2023-10-25 10:42:30
 * @Description  : Do not edit
 */

class PayTypeModel {
  List<PayTypeItem>? onLine;
  List<PayTypeItem>? offLine;
  List<PayTypeItem>? inner;

  PayTypeModel({
    this.onLine,
    this.offLine,
    this.inner,
  });

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

    onLine = List<PayTypeItem>.from(
        (map["onLine"] ?? []).map((x) => PayTypeItem.fromJson(x)));
    offLine = List<PayTypeItem>.from(
        (map["offLine"] ?? []).map((x) => PayTypeItem.fromJson(x)));
    inner = List<PayTypeItem>.from(
        (map["inner"] ?? []).map((x) => PayTypeItem.fromJson(x)));
  }

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

    json['onLine'] = this.onLine;
    json['offLine'] = this.offLine;
    json['inner'] = this.inner;

    return json;
  }
}

class PayTypeItem {
  String? code;
  String? name;
  List<PayTypeItem>? children;

  PayTypeItem({
    this.code,
    this.name,
    this.children,
  });

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

    code = map['code'];
    name = map['name'];
    children = List<PayTypeItem>.from(
        (map["children"] ?? []).map((x) => PayTypeItem.fromJson(x)));
  }

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

    json['code'] = this.code;
    json['name'] = this.name;
    json['children'] = this.children;

    return json;
  }
}
