using System.ComponentModel.DataAnnotations; namespace BudgetApp.Data.Entities; 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; } public bool IsPaid { get; set; } = false; public int? SalaryId { get; set; } public Salary? Salary { get; set; } }