Merged Code
parent
6edcfcd29d
commit
6acbcc7e1d
@ -1,87 +0,0 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final branch2 = branch2FromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:mc_common_app/models/profile/categroy.dart';
|
||||
import 'package:mc_common_app/models/services/branch_model.dart';
|
||||
|
||||
ProviderModel branch2FromJson(String str) => ProviderModel.fromJson(json.decode(str));
|
||||
|
||||
String branch2ToJson(ProviderModel data) => json.encode(data.toJson());
|
||||
|
||||
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"] == null ? null : json["messageStatus"],
|
||||
totalItemsCount: json["totalItemsCount"] == null ? null : json["totalItemsCount"],
|
||||
data: json["data"] == null ? null : ProviderModelData.fromJson(json["data"]),
|
||||
message: json["message"] == null ? null : json["message"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"messageStatus": messageStatus == null ? null : messageStatus,
|
||||
"totalItemsCount": totalItemsCount == null ? null : totalItemsCount,
|
||||
"data": data == null ? null : data!.toJson(),
|
||||
"message": message == null ? null : 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<BranchModel>? 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))),
|
||||
);
|
||||
|
||||
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,
|
||||
"serviceProviderBranch": serviceProviderBranch == null ? null : List<dynamic>.from(serviceProviderBranch!.map((x) => x.toJson())),
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
// 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())),
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final nearBrancheModel = nearBrancheModelFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'branch_model.dart';
|
||||
|
||||
NearBrancheModel nearBrancheModelFromJson(String str) => NearBrancheModel.fromJson(json.decode(str));
|
||||
|
||||
String nearBrancheModelToJson(NearBrancheModel data) => json.encode(data.toJson());
|
||||
|
||||
class NearBrancheModel {
|
||||
final int? messageStatus;
|
||||
final int? totalItemsCount;
|
||||
final List<BranchModel>? data;
|
||||
final String? message;
|
||||
|
||||
NearBrancheModel({
|
||||
this.messageStatus,
|
||||
this.totalItemsCount,
|
||||
this.data,
|
||||
this.message,
|
||||
});
|
||||
|
||||
factory NearBrancheModel.fromJson(Map<String, dynamic> json) => NearBrancheModel(
|
||||
messageStatus: json["messageStatus"],
|
||||
totalItemsCount: json["totalItemsCount"],
|
||||
data: json["data"] == null ? [] : List<BranchModel>.from(json["data"]!.map((x) => BranchModel.fromJson(x))),
|
||||
message: json["message"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"messageStatus": messageStatus,
|
||||
"totalItemsCount": totalItemsCount,
|
||||
"data": data == null ? [] : List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||
"message": message,
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue