new project stable version
This commit is contained in:
33
lib/domain/entities/subscription_period.dart
Normal file
33
lib/domain/entities/subscription_period.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
class SubscriptionPeriod {
|
||||
final int id;
|
||||
final int subscriptionId;
|
||||
final int days;
|
||||
final String title;
|
||||
final double price;
|
||||
final String pricePrint;
|
||||
|
||||
SubscriptionPeriod({
|
||||
required this.id,
|
||||
required this.subscriptionId,
|
||||
required this.days,
|
||||
required this.title,
|
||||
required this.price,
|
||||
required this.pricePrint,
|
||||
});
|
||||
|
||||
factory SubscriptionPeriod.fromJson(Map<String, dynamic> json) {
|
||||
return SubscriptionPeriod(
|
||||
id: json['id'] ?? 0,
|
||||
subscriptionId: json['subscriptionId'] ?? 0,
|
||||
days: json['days'] ?? 0,
|
||||
title: json['title'] ?? '',
|
||||
price: (json['price'] ?? 0).toDouble(),
|
||||
pricePrint: json['pricePrint'] ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubscriptionPeriod{id: $id, title: $title, days: $days, price: $price}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user