144 lines
3.8 KiB
Dart
144 lines
3.8 KiB
Dart
class ExploreSearchPassport {
|
|
List<ExploreSearchPassportData>? data;
|
|
|
|
ExploreSearchPassport({this.data});
|
|
|
|
ExploreSearchPassport.fromJson(Map<String, dynamic> json) {
|
|
if (json['data'] != null) {
|
|
data = <ExploreSearchPassportData>[];
|
|
json['data'].forEach((v) {
|
|
data!.add(new ExploreSearchPassportData.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
if (this.data != null) {
|
|
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class ExploreSearchPassportData {
|
|
int? id;
|
|
String? passportName;
|
|
String? description;
|
|
String? passportId;
|
|
String? thumbnailImage;
|
|
String? image;
|
|
String? activatedOn;
|
|
String? expiryOn;
|
|
int? isPopular;
|
|
String? couponCode;
|
|
String? price;
|
|
int? cityXid;
|
|
int? restaurantXid;
|
|
int? isActive;
|
|
Null? createdBy;
|
|
Null? modifiedBy;
|
|
Null? deletedAt;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
City? city;
|
|
|
|
ExploreSearchPassportData(
|
|
{this.id,
|
|
this.passportName,
|
|
this.description,
|
|
this.passportId,
|
|
this.thumbnailImage,
|
|
this.image,
|
|
this.activatedOn,
|
|
this.expiryOn,
|
|
this.isPopular,
|
|
this.couponCode,
|
|
this.price,
|
|
this.cityXid,
|
|
this.restaurantXid,
|
|
this.isActive,
|
|
this.createdBy,
|
|
this.modifiedBy,
|
|
this.deletedAt,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
this.city});
|
|
|
|
ExploreSearchPassportData.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
passportName = json['passport_name'];
|
|
description = json['description'];
|
|
passportId = json['passport_id'];
|
|
thumbnailImage = json['thumbnail_image'];
|
|
image = json['image'];
|
|
activatedOn = json['activated_on'];
|
|
expiryOn = json['expiry_on'];
|
|
isPopular = json['is_popular'];
|
|
couponCode = json['coupon_code'];
|
|
price = json['price'];
|
|
cityXid = json['city_xid'];
|
|
restaurantXid = json['restaurant_xid'];
|
|
isActive = json['is_active'];
|
|
createdBy = json['created_by'];
|
|
modifiedBy = json['modified_by'];
|
|
deletedAt = json['deleted_at'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
city = json['city'] != null ? new City.fromJson(json['city']) : null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['passport_name'] = this.passportName;
|
|
data['description'] = this.description;
|
|
data['passport_id'] = this.passportId;
|
|
data['thumbnail_image'] = this.thumbnailImage;
|
|
data['image'] = this.image;
|
|
data['activated_on'] = this.activatedOn;
|
|
data['expiry_on'] = this.expiryOn;
|
|
data['is_popular'] = this.isPopular;
|
|
data['coupon_code'] = this.couponCode;
|
|
data['price'] = this.price;
|
|
data['city_xid'] = this.cityXid;
|
|
data['restaurant_xid'] = this.restaurantXid;
|
|
data['is_active'] = this.isActive;
|
|
data['created_by'] = this.createdBy;
|
|
data['modified_by'] = this.modifiedBy;
|
|
data['deleted_at'] = this.deletedAt;
|
|
data['created_at'] = this.createdAt;
|
|
data['updated_at'] = this.updatedAt;
|
|
if (this.city != null) {
|
|
data['city'] = this.city!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class City {
|
|
int? id;
|
|
String? name;
|
|
String? stateName;
|
|
String? countryName;
|
|
|
|
City({this.id, this.name, this.stateName, this.countryName});
|
|
|
|
City.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
stateName = json['state_name'];
|
|
countryName = json['country_name'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['name'] = this.name;
|
|
data['state_name'] = this.stateName;
|
|
data['country_name'] = this.countryName;
|
|
return data;
|
|
}
|
|
}
|