// To parse this JSON data, do
//
//     final branch2 = branch2FromJson(jsonString);

import 'package:mc_common_app/models/provider_branches_models/branch_detail_model.dart';


class ProviderProfileModel {
  ProviderProfileModel({
    this.id,
    this.companyName,
    this.countryName,
    this.companyDescription,
    this.allDocStatus,
    this.isValidSubscription,
    this.userId,
    this.serviceProviderBranch,
    this.countryID,
  });

  final int? id;
  final String? companyName;
  final String? countryName;
  int? countryID;
  final String? companyDescription;
  final int? allDocStatus;
  final bool? isValidSubscription;
  final String? userId;
  final List<BranchDetailModel>? serviceProviderBranch;

  factory ProviderProfileModel.fromJson(Map<String, dynamic> json) => ProviderProfileModel(
        id: json["id"],
        companyName: json["companyName"],
        countryName: json["countryName"],
        countryID: json["countryID"],
        companyDescription: json["companyDescription"],
        allDocStatus: json["allDocStatus"],
        isValidSubscription: json["isValidSubscription"],
        userId: json["userID"],
        serviceProviderBranch: json["serviceProviderBranch"] == null ? null : List<BranchDetailModel>.from(json["serviceProviderBranch"].map((x) => BranchDetailModel.fromJson(x))),
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "companyName": companyName,
        "companyDescription": companyDescription,
        "allDocStatus": allDocStatus,
        "isValidSubscription": isValidSubscription,
        "userID": userId,
        "serviceProviderBranch": serviceProviderBranch == null ? null : List<dynamic>.from(serviceProviderBranch!.map((x) => x.toJson())),
      };
}

