factory DurationModel.fromJson(Map<String, dynamic> json) { return DurationModel( amount: json['amount'] as int, unit: json['unit'] as String, ); }