class Budget {
  String label;
  bool monthly;
  double value;

  Budget({
    this.label = '',
    this.monthly = false,
    this.value = 0.0,
  });

  factory Budget.fromJson(Map<String, dynamic> json) {
    return Budget(
      label: json['label'],
      monthly: bool.parse(json['monthly']),
      value: double.parse(json['value']),
    );
  }

  Map<String, String> toJson() => {
    'label': label,
    'monthly': monthly.toString(),
    'value': value.toString(),
  };
}
