feat: deploy infrastructure + disk/drive, calendar, presentation, workspaces, onboarding, demo user
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
class Tariff {
|
||||
final String id;
|
||||
final String name;
|
||||
final double price;
|
||||
final String currency;
|
||||
final Map<String, dynamic> features;
|
||||
final bool isActive;
|
||||
final DateTime createdAt;
|
||||
|
||||
Tariff({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.price,
|
||||
this.currency = 'RUB',
|
||||
required this.features,
|
||||
this.isActive = true,
|
||||
required this.createdAt,
|
||||
});
|
||||
|
||||
factory Tariff.fromJson(Map<String, dynamic> json) => Tariff(
|
||||
id: json['id'] as String,
|
||||
name: json['name'] as String,
|
||||
price: (json['price'] as num).toDouble(),
|
||||
currency: json['currency'] as String? ?? 'RUB',
|
||||
features: json['features'] as Map<String, dynamic>? ?? {},
|
||||
isActive: json['is_active'] as bool? ?? true,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'price': price,
|
||||
'currency': currency,
|
||||
'features': features,
|
||||
'is_active': isActive,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user