fuelly import but can only import one csv per car.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-01-07 23:00:07 -07:00
parent 418e468f14
commit 33b824b316
10 changed files with 124 additions and 102 deletions

View File

@@ -0,0 +1,20 @@
using CarCareTracker.Models;
using CsvHelper.Configuration;
namespace CarCareTracker.MapProfile
{
public class FuellyMapper: ClassMap<ImportModel>
{
public FuellyMapper()
{
Map(m => m.Date).Name(["date", "fuelup_date"]);
Map(m => m.Odometer).Name(["odometer"]);
Map(m => m.FuelConsumed).Name(["gallons", "liters", "litres"]);
Map(m => m.Cost).Name(["cost", "total cost", "totalcost"]);
Map(m => m.Notes).Name("notes", "note");
Map(m => m.Price).Name(["price"]);
Map(m => m.PartialFuelUp).Name(["partial_fuelup"]);
Map(m => m.IsFillToFull).Name(["isfilltofull", "filled up"]);
}
}
}