

import 'dart:convert';

class ExtraFee {
  int? id;
  String? name;
  String? description;
  double? rate;
  double? price;

  ExtraFee.fromJson(Map<String, dynamic> json)
    : id = json['id'],
      name = json['name'],
      description = json['description'],
      rate = double.parse(json['rate'].toString()),
      price = double.parse(json['price'].toString());

  Map<String, dynamic> toJson() => {
    'id': id,
    'name': name,
    'description': description,
    'rate': rate,
    'price': price,
  };

  @override
  String toString() {
    return json.encode(this);
  }
}