You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.5 KiB
Dart
89 lines
2.5 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final branch2 = branch2FromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
import 'package:mc_common_app/models/provider_branches_models/branch_detail_model.dart';
|
|
|
|
ProviderModel branch2FromJson(String str) => ProviderModel.fromJson(json.decode(str));
|
|
|
|
class ProviderModel {
|
|
ProviderModel({
|
|
this.messageStatus,
|
|
this.totalItemsCount,
|
|
this.data,
|
|
this.message,
|
|
});
|
|
|
|
final int? messageStatus;
|
|
final int? totalItemsCount;
|
|
final ProviderModelData? data;
|
|
final String? message;
|
|
|
|
factory ProviderModel.fromJson(Map<String, dynamic> json) => ProviderModel(
|
|
messageStatus: json["messageStatus"],
|
|
totalItemsCount: json["totalItemsCount"],
|
|
data: json["data"] == null ? null : ProviderModelData.fromJson(json["data"]),
|
|
message: json["message"],
|
|
);
|
|
}
|
|
|
|
class ProviderModelData {
|
|
ProviderModelData({
|
|
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 ProviderModelData.fromJson(Map<String, dynamic> json) => ProviderModelData(
|
|
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))),
|
|
);
|
|
}
|
|
|
|
class ProviderBasicDataModel {
|
|
int? id;
|
|
String? providerName;
|
|
String? providerDescription;
|
|
|
|
ProviderBasicDataModel({this.id, this.providerName, this.providerDescription});
|
|
|
|
ProviderBasicDataModel.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
providerName = json['providerName'];
|
|
providerDescription = json['providerDescription'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['providerName'] = providerName;
|
|
data['providerDescription'] = providerDescription;
|
|
return data;
|
|
}
|
|
}
|