import 'package:mc_common_app/extensions/string_extensions.dart'; import 'package:mc_common_app/utils/enums.dart'; class OffersModel { int? id; int? requestID; int? serviceProviderID; ServiceProvider? serviceProvider; int? offerStatus; RequestOfferStatusEnum? requestOfferStatusEnum; 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 json) { id = json['id']; requestID = json['requestID']; serviceProviderID = json['serviceProviderID']; serviceProvider = json['serviceProvider'] != null ? ServiceProvider.fromJson(json['serviceProvider']) : null; offerStatus = json['offerStatus']; requestOfferStatusEnum = ((json['offerStatus']) as int).toRequestOfferStatusEnum(); offerStatusText = json['offerStatusText']; comment = json['comment']; price = json['price']; } } 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 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 toJson() { final Map data = {}; 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; } }