|
|
|
|
@ -47,17 +47,6 @@ class AdsCreationPayloadModel {
|
|
|
|
|
ads = json['ads'] != null ? Ads.fromJson(json['ads']) : null;
|
|
|
|
|
vehiclePosting = json['vehiclePosting'] != null ? VehiclePosting.fromJson(json['vehiclePosting']) : null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
if (ads != null) {
|
|
|
|
|
data['ads'] = ads!.toJson();
|
|
|
|
|
}
|
|
|
|
|
if (vehiclePosting != null) {
|
|
|
|
|
data['vehiclePosting'] = vehiclePosting!.toJson();
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Ads {
|
|
|
|
|
@ -67,8 +56,19 @@ class Ads {
|
|
|
|
|
int? countryId;
|
|
|
|
|
List<int>? specialServiceIDs;
|
|
|
|
|
bool? isMCHandled;
|
|
|
|
|
|
|
|
|
|
Ads({this.id, this.adsDurationID, this.startDate, this.countryId, this.specialServiceIDs, this.isMCHandled});
|
|
|
|
|
bool? showContactDetail;
|
|
|
|
|
bool? isOnWhatsApp;
|
|
|
|
|
|
|
|
|
|
Ads({
|
|
|
|
|
this.id,
|
|
|
|
|
this.adsDurationID,
|
|
|
|
|
this.startDate,
|
|
|
|
|
this.countryId,
|
|
|
|
|
this.specialServiceIDs,
|
|
|
|
|
this.isMCHandled,
|
|
|
|
|
this.showContactDetail,
|
|
|
|
|
this.isOnWhatsApp,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Ads.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
@ -77,6 +77,8 @@ class Ads {
|
|
|
|
|
countryId = json['countryId'];
|
|
|
|
|
specialServiceIDs = json['specialServiceIDs'].cast<int>();
|
|
|
|
|
isMCHandled = json['isMCHandled'];
|
|
|
|
|
showContactDetail = json['showContactDetail'];
|
|
|
|
|
isOnWhatsApp = json['isOnWhatsApp'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
@ -123,32 +125,33 @@ class VehiclePosting {
|
|
|
|
|
String? phoneNo;
|
|
|
|
|
String? whatsAppNo;
|
|
|
|
|
|
|
|
|
|
VehiclePosting(
|
|
|
|
|
{this.id,
|
|
|
|
|
this.userID,
|
|
|
|
|
this.vehicleType,
|
|
|
|
|
this.vehicleModelID,
|
|
|
|
|
this.vehicleModelYearID,
|
|
|
|
|
this.vehicleColorID,
|
|
|
|
|
this.vehicleCategoryID,
|
|
|
|
|
this.vehicleConditionID,
|
|
|
|
|
this.vehicleMileageID,
|
|
|
|
|
this.vehicleTransmissionID,
|
|
|
|
|
this.vehicleSellerTypeID,
|
|
|
|
|
this.cityID,
|
|
|
|
|
this.price,
|
|
|
|
|
this.vehicleVIN,
|
|
|
|
|
this.vehicleDescription,
|
|
|
|
|
this.vehicleTitle,
|
|
|
|
|
this.vehicleDescriptionN,
|
|
|
|
|
this.isFinanceAvailable,
|
|
|
|
|
this.warantyYears,
|
|
|
|
|
this.demandAmount,
|
|
|
|
|
this.adStatus,
|
|
|
|
|
this.phoneNo,
|
|
|
|
|
this.whatsAppNo,
|
|
|
|
|
this.vehiclePostingImages,
|
|
|
|
|
this.vehiclePostingDamageParts});
|
|
|
|
|
VehiclePosting({
|
|
|
|
|
this.id,
|
|
|
|
|
this.userID,
|
|
|
|
|
this.vehicleType,
|
|
|
|
|
this.vehicleModelID,
|
|
|
|
|
this.vehicleModelYearID,
|
|
|
|
|
this.vehicleColorID,
|
|
|
|
|
this.vehicleCategoryID,
|
|
|
|
|
this.vehicleConditionID,
|
|
|
|
|
this.vehicleMileageID,
|
|
|
|
|
this.vehicleTransmissionID,
|
|
|
|
|
this.vehicleSellerTypeID,
|
|
|
|
|
this.cityID,
|
|
|
|
|
this.price,
|
|
|
|
|
this.vehicleVIN,
|
|
|
|
|
this.vehicleDescription,
|
|
|
|
|
this.vehicleTitle,
|
|
|
|
|
this.vehicleDescriptionN,
|
|
|
|
|
this.isFinanceAvailable,
|
|
|
|
|
this.warantyYears,
|
|
|
|
|
this.demandAmount,
|
|
|
|
|
this.adStatus,
|
|
|
|
|
this.phoneNo,
|
|
|
|
|
this.whatsAppNo,
|
|
|
|
|
this.vehiclePostingImages,
|
|
|
|
|
this.vehiclePostingDamageParts,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
VehiclePosting.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
id = json['id'];
|
|
|
|
|
@ -188,40 +191,6 @@ class VehiclePosting {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
|
|
|
data['id'] = id;
|
|
|
|
|
data['userID'] = userID;
|
|
|
|
|
data['vehicleType'] = vehicleType;
|
|
|
|
|
data['vehicleModelID'] = vehicleModelID;
|
|
|
|
|
data['vehicleModelYearID'] = vehicleModelYearID;
|
|
|
|
|
data['vehicleColorID'] = vehicleColorID;
|
|
|
|
|
data['vehicleCategoryID'] = vehicleCategoryID;
|
|
|
|
|
data['vehicleConditionID'] = vehicleConditionID;
|
|
|
|
|
data['vehicleMileageID'] = vehicleMileageID;
|
|
|
|
|
data['vehicleTransmissionID'] = vehicleTransmissionID;
|
|
|
|
|
data['vehicleSellerTypeID'] = vehicleSellerTypeID;
|
|
|
|
|
data['cityID'] = cityID;
|
|
|
|
|
data['price'] = price;
|
|
|
|
|
data['vehicleVIN'] = vehicleVIN;
|
|
|
|
|
data['vehicleDescription'] = vehicleDescription;
|
|
|
|
|
data['vehicleTitle'] = vehicleTitle;
|
|
|
|
|
data['vehicleDescriptionN'] = vehicleDescriptionN;
|
|
|
|
|
data['isFinanceAvailable'] = isFinanceAvailable;
|
|
|
|
|
data['warantyYears'] = warantyYears;
|
|
|
|
|
data['demandAmount'] = demandAmount;
|
|
|
|
|
data['adStatus'] = adStatus;
|
|
|
|
|
data['phoneNo'] = phoneNo;
|
|
|
|
|
data['whatsAppNo'] = whatsAppNo;
|
|
|
|
|
if (vehiclePostingImages != null) {
|
|
|
|
|
data['vehiclePostingImages'] = vehiclePostingImages!.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
if (vehiclePostingDamageParts != null) {
|
|
|
|
|
data['vehiclePostingDamageParts'] = vehiclePostingDamageParts!.map((v) => v.toJson()).toList();
|
|
|
|
|
}
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'VehiclePosting{id: $id, userID: $userID, vehicleType: $vehicleType, vehicleModelID: $vehicleModelID, vehicleModelYearID: $vehicleModelYearID, vehicleColorID: $vehicleColorID, vehicleCategoryID: $vehicleCategoryID, vehicleConditionID: $vehicleConditionID, vehicleMileageID: $vehicleMileageID, vehicleTransmissionID: $vehicleTransmissionID, vehicleSellerTypeID: $vehicleSellerTypeID, cityID: $cityID, price: $price, vehicleVIN: $vehicleVIN, vehicleDescription: $vehicleDescription, vehicleTitle: $vehicleTitle, vehicleDescriptionN: $vehicleDescriptionN, isFinanceAvailable: $isFinanceAvailable, warantyYears: $warantyYears, demandAmount: $demandAmount, adStatus: $adStatus, vehiclePostingImages: $vehiclePostingImages, vehiclePostingDamageParts: $vehiclePostingDamageParts, phoneNo: $phoneNo, whatsAppNo: $whatsAppNo}';
|
|
|
|
|
|