class Transaction {
  final String? id;
  final String? name;
  final String? date;
  final String? amount;
  final String? type;
  final String? balance;
  final String? balanceType;

  Transaction(
      {this.id,
      this.name,
      this.date,
      this.amount,
      this.type,
      this.balance,
      this.balanceType});

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'name': name,
      'date': date,
      'amount': amount,
      'type': type,
      'balance': balance,
      'balanceType': balanceType
    };
  }

  factory Transaction.fromJson(Map<String, dynamic> json) {
    return Transaction(
        id: json['id'] as String?,
        name: json['name'] as String?,
        date: json['date'] as String?,
        amount: json['amount'] as String?,
        type: json['type'] as String?,
        balance: json['balance'] as String?,
        balanceType: json['balanceType'] as String?);
  }
}
