using System.ComponentModel.DataAnnotations; namespace BudgetApp.Data; public enum TransactionType { Income, Expense } public enum RecurrenceType { None, Daily, Weekly, Monthly, Yearly } public class Transaction { public int Id { get; set; } [Required, MaxLength(200)] public string Description { get; set; } = string.Empty; public decimal Amount { get; set; } public DateTime Date { get; set; } = DateTime.Today; public TransactionType Type { get; set; } = TransactionType.Expense; public RecurrenceType RecurrenceType { get; set; } = RecurrenceType.None; public DateTime? RecurrenceEndDate { get; set; } public int? ParentTransactionId { get; set; } public Transaction? ParentTransaction { get; set; } public int AccountId { get; set; } public Account Account { get; set; } = default!; public int? CategoryId { get; set; } public Category? Category { get; set; } }