first commit
This commit is contained in:
8
Models/Report/CostDistanceTableForVehicle.cs
Normal file
8
Models/Report/CostDistanceTableForVehicle.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class CostDistanceTableForVehicle
|
||||
{
|
||||
public string DistanceUnit { get; set; } = "mi.";
|
||||
public List<CostForVehicleByMonth> CostData { get; set; } = new List<CostForVehicleByMonth>();
|
||||
}
|
||||
}
|
||||
12
Models/Report/CostForVehicleByMonth.cs
Normal file
12
Models/Report/CostForVehicleByMonth.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class CostForVehicleByMonth
|
||||
{
|
||||
public int Year { get; set; }
|
||||
public int MonthId { get; set; }
|
||||
public string MonthName { get; set; }
|
||||
public decimal Cost { get; set; }
|
||||
public int DistanceTraveled { get; set; }
|
||||
public decimal CostPerDistanceTraveled { get { if (DistanceTraveled > 0) { return Cost / DistanceTraveled; } else { return 0M; } } }
|
||||
}
|
||||
}
|
||||
11
Models/Report/CostMakeUpForVehicle.cs
Normal file
11
Models/Report/CostMakeUpForVehicle.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class CostMakeUpForVehicle
|
||||
{
|
||||
public decimal ServiceRecordSum { get; set; }
|
||||
public decimal GasRecordSum { get; set; }
|
||||
public decimal TaxRecordSum { get; set; }
|
||||
public decimal CollisionRecordSum { get; set; }
|
||||
public decimal UpgradeRecordSum { get; set; }
|
||||
}
|
||||
}
|
||||
27
Models/Report/CostTableForVehicle.cs
Normal file
27
Models/Report/CostTableForVehicle.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class CostTableForVehicle
|
||||
{
|
||||
public string DistanceUnit { get; set; } = "Cost Per Mile";
|
||||
public int TotalDistance { get; set; }
|
||||
public int NumberOfDays { get; set; }
|
||||
public decimal ServiceRecordSum { get; set; }
|
||||
public decimal GasRecordSum { get; set; }
|
||||
public decimal TaxRecordSum { get; set; }
|
||||
public decimal CollisionRecordSum { get; set; }
|
||||
public decimal UpgradeRecordSum { get; set; }
|
||||
public decimal ServiceRecordPerMile { get { return TotalDistance != default ? ServiceRecordSum / TotalDistance : 0; } }
|
||||
public decimal GasRecordPerMile { get { return TotalDistance != default ? GasRecordSum / TotalDistance : 0; } }
|
||||
public decimal CollisionRecordPerMile { get { return TotalDistance != default ? CollisionRecordSum / TotalDistance : 0; } }
|
||||
public decimal UpgradeRecordPerMile { get { return TotalDistance != default ? UpgradeRecordSum / TotalDistance : 0; } }
|
||||
public decimal TaxRecordPerMile { get { return TotalDistance != default ? TaxRecordSum / TotalDistance : 0; } }
|
||||
public decimal ServiceRecordPerDay { get { return NumberOfDays != default ? ServiceRecordSum / NumberOfDays : 0; } }
|
||||
public decimal GasRecordPerDay { get { return NumberOfDays != default ? GasRecordSum / NumberOfDays : 0; } }
|
||||
public decimal CollisionRecordPerDay { get { return NumberOfDays != default ? CollisionRecordSum / NumberOfDays : 0; } }
|
||||
public decimal UpgradeRecordPerDay { get { return NumberOfDays != default ? UpgradeRecordSum / NumberOfDays : 0; } }
|
||||
public decimal TaxRecordPerDay { get { return NumberOfDays != default ? TaxRecordSum / NumberOfDays : 0; } }
|
||||
public decimal TotalPerDay { get { return ServiceRecordPerDay + CollisionRecordPerDay + UpgradeRecordPerDay + GasRecordPerDay + TaxRecordPerDay; } }
|
||||
public decimal TotalPerMile { get { return ServiceRecordPerMile + CollisionRecordPerMile + UpgradeRecordPerMile + GasRecordPerMile + TaxRecordPerMile; } }
|
||||
public decimal TotalCost { get { return ServiceRecordSum + CollisionRecordSum + UpgradeRecordSum + GasRecordSum + TaxRecordSum; } }
|
||||
}
|
||||
}
|
||||
18
Models/Report/GenericReportModel.cs
Normal file
18
Models/Report/GenericReportModel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Generic Model used for vehicle history report.
|
||||
/// </summary>
|
||||
public class GenericReportModel
|
||||
{
|
||||
public ImportMode DataType { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public int Odometer { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public decimal Cost { get; set; }
|
||||
public List<UploadedFiles> Files { get; set; } = new List<UploadedFiles>();
|
||||
public List<ExtraField> ExtraFields { get; set; } = new List<ExtraField>();
|
||||
public List<SupplyUsageHistory> RequisitionHistory { get; set; } = new List<SupplyUsageHistory>();
|
||||
}
|
||||
}
|
||||
9
Models/Report/MPGForVehicleByMonth.cs
Normal file
9
Models/Report/MPGForVehicleByMonth.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class MPGForVehicleByMonth
|
||||
{
|
||||
public List<CostForVehicleByMonth> CostData { get; set; } = new List<CostForVehicleByMonth>();
|
||||
public List<CostForVehicleByMonth> SortedCostData { get; set; } = new List<CostForVehicleByMonth>();
|
||||
public string Unit { get; set; }
|
||||
}
|
||||
}
|
||||
10
Models/Report/ReminderMakeUpForVehicle.cs
Normal file
10
Models/Report/ReminderMakeUpForVehicle.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReminderMakeUpForVehicle
|
||||
{
|
||||
public int NotUrgentCount { get; set; }
|
||||
public int UrgentCount { get; set; }
|
||||
public int VeryUrgentCount { get; set; }
|
||||
public int PastDueCount { get; set; }
|
||||
}
|
||||
}
|
||||
10
Models/Report/ReportHeader.cs
Normal file
10
Models/Report/ReportHeader.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReportHeader
|
||||
{
|
||||
public int MaxOdometer { get; set; }
|
||||
public int DistanceTraveled { get; set; }
|
||||
public decimal TotalCost { get; set; }
|
||||
public string AverageMPG { get; set; }
|
||||
}
|
||||
}
|
||||
14
Models/Report/ReportParameter.cs
Normal file
14
Models/Report/ReportParameter.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReportParameter
|
||||
{
|
||||
public List<string> VisibleColumns { get; set; } = new List<string>();
|
||||
public List<string> ExtraFields { get; set; } = new List<string>();
|
||||
public TagFilter TagFilter { get; set; } = TagFilter.Exclude;
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
public bool FilterByDateRange { get; set; } = false;
|
||||
public string StartDate { get; set; } = "";
|
||||
public string EndDate { get; set; } = "";
|
||||
public bool PrintIndividualRecords { get; set; } = false;
|
||||
}
|
||||
}
|
||||
15
Models/Report/ReportViewModel.cs
Normal file
15
Models/Report/ReportViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class ReportViewModel
|
||||
{
|
||||
public ReportHeader ReportHeaderForVehicle { get; set; } = new ReportHeader();
|
||||
public List<CostForVehicleByMonth> CostForVehicleByMonth { get; set; } = new List<CostForVehicleByMonth>();
|
||||
public MPGForVehicleByMonth FuelMileageForVehicleByMonth { get; set; } = new MPGForVehicleByMonth();
|
||||
public CostMakeUpForVehicle CostMakeUpForVehicle { get; set; } = new CostMakeUpForVehicle();
|
||||
public ReminderMakeUpForVehicle ReminderMakeUpForVehicle { get; set; } = new ReminderMakeUpForVehicle();
|
||||
public List<int> Years { get; set; } = new List<int>();
|
||||
public List<UserCollaborator> Collaborators { get; set; } = new List<UserCollaborator>();
|
||||
public bool CustomWidgetsConfigured { get; set; } = false;
|
||||
public List<ImportMode> AvailableMetrics { get; set; } = new List<ImportMode>();
|
||||
}
|
||||
}
|
||||
23
Models/Report/VehicleHistoryViewModel.cs
Normal file
23
Models/Report/VehicleHistoryViewModel.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace MotoVaultPro.Models
|
||||
{
|
||||
public class VehicleHistoryViewModel
|
||||
{
|
||||
public Vehicle VehicleData { get; set; }
|
||||
public List<GenericReportModel> VehicleHistory { get; set; }
|
||||
public ReportParameter ReportParameters { get; set; }
|
||||
public string Odometer { get; set; }
|
||||
public string MPG { get; set; }
|
||||
public decimal TotalCost { get; set; }
|
||||
public decimal TotalGasCost { get; set; }
|
||||
public string DaysOwned { get; set; }
|
||||
public string DistanceTraveled { get; set; }
|
||||
public decimal TotalCostPerMile { get; set; }
|
||||
public decimal TotalGasCostPerMile { get; set; }
|
||||
public string DistanceUnit { get; set; }
|
||||
public decimal TotalDepreciation { get; set; }
|
||||
public decimal DepreciationPerDay { get; set; }
|
||||
public decimal DepreciationPerMile { get; set; }
|
||||
public string StartDate { get; set; }
|
||||
public string EndDate { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user