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.
65 lines
1.5 KiB
Dart
65 lines
1.5 KiB
Dart
class AdsDurationModel {
|
|
int? id;
|
|
String? name;
|
|
int? days;
|
|
double? price;
|
|
int? countryID;
|
|
bool? isActive;
|
|
String? countryName;
|
|
String? currency;
|
|
double? discountValue;
|
|
double? discountPercent;
|
|
double? priceAfterDiscount;
|
|
int? roleID;
|
|
bool? isSelected;
|
|
|
|
AdsDurationModel({
|
|
this.id,
|
|
this.name,
|
|
this.days,
|
|
this.price,
|
|
this.countryID,
|
|
this.isActive,
|
|
this.countryName,
|
|
this.currency,
|
|
this.discountValue,
|
|
this.discountPercent,
|
|
this.priceAfterDiscount,
|
|
this.roleID,
|
|
this.isSelected,
|
|
});
|
|
|
|
AdsDurationModel.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
name = json['name'];
|
|
days = json['days'];
|
|
price = json['price'];
|
|
countryID = json['countryID'];
|
|
isActive = json['isActive'];
|
|
countryName = json['countryName'];
|
|
currency = json['currency'];
|
|
discountValue = json['discountValue'];
|
|
discountPercent = json['discountPercent'];
|
|
priceAfterDiscount = json['priceAfterDiscount'];
|
|
roleID = json['roleID'];
|
|
isSelected = false;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['name'] = name;
|
|
data['days'] = days;
|
|
data['price'] = price;
|
|
data['countryID'] = countryID;
|
|
data['isActive'] = isActive;
|
|
data['countryName'] = countryName;
|
|
data['currency'] = currency;
|
|
data['discountValue'] = discountValue;
|
|
data['discountPercent'] = discountPercent;
|
|
data['priceAfterDiscount'] = priceAfterDiscount;
|
|
data['roleID'] = roleID;
|
|
return data;
|
|
}
|
|
}
|