refactor: extract Models and Data into MoneyMap.Core shared library

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 18:16:33 -04:00
parent d831991ad0
commit 3deca29f05
23 changed files with 59 additions and 7 deletions
@@ -0,0 +1,32 @@
using CsvHelper.Configuration;
namespace MoneyMap.Models.Import;
public sealed class TransactionCsvRowMap : ClassMap<TransactionCsvRow>
{
public TransactionCsvRowMap(bool hasCategory)
{
Map(m => m.Date).Name("Date");
Map(m => m.Transaction).Name("Transaction");
Map(m => m.Name).Name("Name");
Map(m => m.Memo).Name("Memo");
Map(m => m.Amount).Name("Amount");
if (hasCategory)
{
Map(m => m.Category).Name("Category");
}
else
{
if (hasCategory)
{
Map(m => m.Category).Name("Category");
}
else
{
Map(m => m.Category).Constant(string.Empty).Optional();
}
}
}
}