first commit

This commit is contained in:
Eric Gullickson
2025-07-15 20:34:05 -05:00
commit f7eca4bad5
602 changed files with 158990 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
namespace MotoVaultPro.Models
{
public class GasRecord
{
public int Id { get; set; }
public int VehicleId { get; set; }
public DateTime Date { get; set; }
/// <summary>
/// American moment
/// </summary>
public int Mileage { get; set; }
/// <summary>
/// Wtf is a kilometer?
/// </summary>
public decimal Gallons { get; set; }
public decimal Cost { get; set; }
public bool IsFillToFull { get; set; } = true;
public bool MissedFuelUp { get; set; } = false;
public string Notes { get; set; }
public List<UploadedFiles> Files { get; set; } = new List<UploadedFiles>();
public List<string> Tags { get; set; } = new List<string>();
public List<ExtraField> ExtraFields { get; set; } = new List<ExtraField>();
}
}

View File

@@ -0,0 +1,8 @@
namespace MotoVaultPro.Models
{
public class GasRecordEditModel
{
public List<int> RecordIds { get; set; } = new List<int>();
public GasRecord EditRecord { get; set; } = new GasRecord();
}
}

View File

@@ -0,0 +1,38 @@
namespace MotoVaultPro.Models
{
public class GasRecordInput
{
public int Id { get; set; }
public int VehicleId { get; set; }
public string Date { get; set; } = DateTime.Now.ToShortDateString();
/// <summary>
/// American moment
/// </summary>
public int Mileage { get; set; }
/// <summary>
/// Wtf is a kilometer?
/// </summary>
public decimal Gallons { get; set; }
public decimal Cost { get; set; }
public bool IsFillToFull { get; set; } = true;
public bool MissedFuelUp { get; set; } = false;
public string Notes { get; set; }
public List<UploadedFiles> Files { get; set; } = new List<UploadedFiles>();
public List<string> Tags { get; set; } = new List<string>();
public List<ExtraField> ExtraFields { get; set; } = new List<ExtraField>();
public GasRecord ToGasRecord() { return new GasRecord {
Id = Id,
Cost = Cost,
Date = DateTime.Parse(Date),
Gallons = Gallons,
Mileage = Mileage,
VehicleId = VehicleId,
Files = Files,
IsFillToFull = IsFillToFull,
MissedFuelUp = MissedFuelUp,
Notes = Notes,
Tags = Tags,
ExtraFields = ExtraFields
}; }
}
}

View File

@@ -0,0 +1,9 @@
namespace MotoVaultPro.Models
{
public class GasRecordInputContainer
{
public bool UseKwh { get; set; }
public bool UseHours { get; set; }
public GasRecordInput GasRecord { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
namespace MotoVaultPro.Models
{
public class GasRecordViewModel
{
public int Id { get; set; }
public int VehicleId { get; set; }
public int MonthId { get; set; }
public string Date { get; set; }
/// <summary>
/// American moment
/// </summary>
public int Mileage { get; set; }
/// <summary>
/// Wtf is a kilometer?
/// </summary>
public decimal Gallons { get; set; }
public decimal Cost { get; set; }
public int DeltaMileage { get; set; }
public decimal MilesPerGallon { get; set; }
public decimal CostPerGallon { get; set; }
public bool IsFillToFull { get; set; }
public bool MissedFuelUp { get; set; }
public string Notes { get; set; }
public List<string> Tags { get; set; } = new List<string>();
public List<ExtraField> ExtraFields { get; set; } = new List<ExtraField>();
public List<UploadedFiles> Files { get; set; } = new List<UploadedFiles>();
public bool IncludeInAverage { get { return MilesPerGallon > 0 || (!IsFillToFull && !MissedFuelUp) || (Mileage == default && !MissedFuelUp); } }
}
}

View File

@@ -0,0 +1,9 @@
namespace MotoVaultPro.Models
{
public class GasRecordViewModelContainer
{
public bool UseKwh { get; set; }
public bool UseHours { get; set; }
public List<GasRecordViewModel> GasRecords { get; set; } = new List<GasRecordViewModel>();
}
}