24 lines
525 B
Dart
24 lines
525 B
Dart
import 'package:flutter/material.dart';
|
|
import 'category.dart';
|
|
|
|
class TransactionRecord {
|
|
final int id;
|
|
final String type; // 'income' or 'expense'
|
|
final double amount;
|
|
final Category? category; // Reference to category (null for income)
|
|
final DateTime date;
|
|
final String merchant;
|
|
|
|
TransactionRecord({
|
|
required this.id,
|
|
required this.type,
|
|
required this.amount,
|
|
this.category,
|
|
required this.date,
|
|
required this.merchant,
|
|
});
|
|
|
|
// Removed the hardcoded id getter
|
|
// get id => 1;
|
|
}
|