|
|
|
|
@ -4,8 +4,7 @@
|
|
|
|
|
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
|
|
import 'package:mc_common_app/models/profile/categroy.dart';
|
|
|
|
|
import 'package:mc_common_app/models/services/branch_model.dart';
|
|
|
|
|
import 'package:mc_common_app/models/provider_branches_models/branch_detail_model.dart';
|
|
|
|
|
|
|
|
|
|
ProviderModel branch2FromJson(String str) => ProviderModel.fromJson(json.decode(str));
|
|
|
|
|
|
|
|
|
|
@ -26,18 +25,18 @@ class ProviderModel {
|
|
|
|
|
|
|
|
|
|
factory ProviderModel.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
ProviderModel(
|
|
|
|
|
messageStatus: json["messageStatus"] == null ? null : json["messageStatus"],
|
|
|
|
|
totalItemsCount: json["totalItemsCount"] == null ? null : json["totalItemsCount"],
|
|
|
|
|
messageStatus: json["messageStatus"],
|
|
|
|
|
totalItemsCount: json["totalItemsCount"],
|
|
|
|
|
data: json["data"] == null ? null : ProviderModelData.fromJson(json["data"]),
|
|
|
|
|
message: json["message"] == null ? null : json["message"],
|
|
|
|
|
message: json["message"],
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() =>
|
|
|
|
|
{
|
|
|
|
|
"messageStatus": messageStatus == null ? null : messageStatus,
|
|
|
|
|
"totalItemsCount": totalItemsCount == null ? null : totalItemsCount,
|
|
|
|
|
"messageStatus": messageStatus,
|
|
|
|
|
"totalItemsCount": totalItemsCount,
|
|
|
|
|
"data": data == null ? null : data!.toJson(),
|
|
|
|
|
"message": message == null ? null : message,
|
|
|
|
|
"message": message,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -62,29 +61,29 @@ class ProviderModelData {
|
|
|
|
|
final int? allDocStatus;
|
|
|
|
|
final bool? isValidSubscription;
|
|
|
|
|
final String? userId;
|
|
|
|
|
final List<BranchModel>? serviceProviderBranch;
|
|
|
|
|
final List<BranchDetailModel>? serviceProviderBranch;
|
|
|
|
|
|
|
|
|
|
factory ProviderModelData.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
ProviderModelData(
|
|
|
|
|
id: json["id"] == null ? null : json["id"],
|
|
|
|
|
companyName: json["companyName"] == null ? null : json["companyName"],
|
|
|
|
|
countryName: json["countryName"] == null ? null : json["countryName"],
|
|
|
|
|
countryID: json["countryID"] == null ? null : json["countryID"],
|
|
|
|
|
companyDescription: json["companyDescription"] == null ? null : json["companyDescription"],
|
|
|
|
|
allDocStatus: json["allDocStatus"] == null ? null : json["allDocStatus"],
|
|
|
|
|
isValidSubscription: json["isValidSubscription"] == null ? null : json["isValidSubscription"],
|
|
|
|
|
userId: json["userID"] == null ? null : json["userID"],
|
|
|
|
|
serviceProviderBranch: json["serviceProviderBranch"] == null ? null : List<BranchModel>.from(json["serviceProviderBranch"].map((x) => BranchModel.fromJson(x))),
|
|
|
|
|
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 == null ? null : id,
|
|
|
|
|
"companyName": companyName == null ? null : companyName,
|
|
|
|
|
"companyDescription": companyDescription == null ? null : companyDescription,
|
|
|
|
|
"allDocStatus": allDocStatus == null ? null : allDocStatus,
|
|
|
|
|
"isValidSubscription": isValidSubscription == null ? null : isValidSubscription,
|
|
|
|
|
"userID": userId == null ? null : userId,
|
|
|
|
|
"id": id,
|
|
|
|
|
"companyName": companyName,
|
|
|
|
|
"companyDescription": companyDescription,
|
|
|
|
|
"allDocStatus": allDocStatus,
|
|
|
|
|
"isValidSubscription": isValidSubscription,
|
|
|
|
|
"userID": userId,
|
|
|
|
|
"serviceProviderBranch": serviceProviderBranch == null ? null : List<dynamic>.from(serviceProviderBranch!.map((x) => x.toJson())),
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|