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.
car_common_app/lib/models/requests/offers_model.dart

170 lines
4.6 KiB
Dart

class OffersModel {
int? id;
int? requestID;
int? serviceProviderID;
ServiceProvider? serviceProvider;
int? offerStatus;
String? offerStatusText;
String? comment;
double? price;
OffersModel(
{this.id,
this.requestID,
this.serviceProviderID,
this.serviceProvider,
this.offerStatus,
this.offerStatusText,
this.comment,
this.price});
OffersModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
requestID = json['requestID'];
serviceProviderID = json['serviceProviderID'];
serviceProvider = json['serviceProvider'] != null
? ServiceProvider.fromJson(json['serviceProvider'])
: null;
offerStatus = json['offerStatus'];
offerStatusText = json['offerStatusText'];
comment = json['comment'];
price = json['price'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['requestID'] = requestID;
data['serviceProviderID'] = serviceProviderID;
if (serviceProvider != null) {
data['serviceProvider'] = serviceProvider!.toJson();
}
data['offerStatus'] = offerStatus;
data['offerStatusText'] = offerStatusText;
data['comment'] = comment;
data['price'] = price;
return data;
}
}
class ServiceProvider {
int? providerId;
String? providerGUID;
String? firstName;
String? lastName;
String? name;
int? gender;
String? genderName;
String? mobileNo;
String? email;
bool? isEmailVerfied;
bool? isCompleted;
int? city;
String? cityName;
int? country;
String? countryName;
int? accountStatus;
String? accountStatusText;
int? activityStatus;
String? activityStatusText;
String? bankName;
String? iBanNo;
bool? isActive;
String? subscriptionDate;
String? companyName;
String? currency;
String? branch;
dynamic requestOffer;
ServiceProvider(
{this.providerId,
this.providerGUID,
this.firstName,
this.lastName,
this.name,
this.gender,
this.genderName,
this.mobileNo,
this.email,
this.isEmailVerfied,
this.isCompleted,
this.city,
this.cityName,
this.country,
this.countryName,
this.accountStatus,
this.accountStatusText,
this.activityStatus,
this.activityStatusText,
this.bankName,
this.iBanNo,
this.isActive,
this.subscriptionDate,
this.companyName,
this.currency,
this.branch,
this.requestOffer});
ServiceProvider.fromJson(Map<String, dynamic> json) {
providerId = json['providerId'];
providerGUID = json['providerGUID'];
firstName = json['firstName'];
lastName = json['lastName'];
name = json['name'];
gender = json['gender'];
genderName = json['genderName'];
mobileNo = json['mobileNo'];
email = json['email'];
isEmailVerfied = json['isEmailVerfied'];
isCompleted = json['isCompleted'];
city = json['city'];
cityName = json['cityName'];
country = json['country'];
countryName = json['countryName'];
accountStatus = json['accountStatus'];
accountStatusText = json['accountStatusText'];
activityStatus = json['activityStatus'];
activityStatusText = json['activityStatusText'];
bankName = json['bankName'];
iBanNo = json['iBanNo'];
isActive = json['isActive'];
subscriptionDate = json['subscriptionDate'];
companyName = json['companyName'];
currency = json['currency'];
branch = json['branch'];
requestOffer = json['requestOffer'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['providerId'] = providerId;
data['providerGUID'] = providerGUID;
data['firstName'] = firstName;
data['lastName'] = lastName;
data['name'] = name;
data['gender'] = gender;
data['genderName'] = genderName;
data['mobileNo'] = mobileNo;
data['email'] = email;
data['isEmailVerfied'] = isEmailVerfied;
data['isCompleted'] = isCompleted;
data['city'] = city;
data['cityName'] = cityName;
data['country'] = country;
data['countryName'] = countryName;
data['accountStatus'] = accountStatus;
data['accountStatusText'] = accountStatusText;
data['activityStatus'] = activityStatus;
data['activityStatusText'] = activityStatusText;
data['bankName'] = bankName;
data['iBanNo'] = iBanNo;
data['isActive'] = isActive;
data['subscriptionDate'] = subscriptionDate;
data['companyName'] = companyName;
data['currency'] = currency;
data['branch'] = branch;
data['requestOffer'] = requestOffer;
return data;
}
}