Add project files.
This commit is contained in:
1 parent
fd9f318d6a
commit
0ce077ec11
98 files changed
+65707
No files matched your search
@@ -0,0 +1,45 @@
|
||||
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; }
|
||||
}
|
||||
Reference in new issue
Block a user