odometer to trips improvement.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-03-10 06:33:39 -06:00
parent 5ba0bd5771
commit def9a7770f
15 changed files with 154 additions and 42 deletions

View File

@@ -5,7 +5,9 @@
public int Id { get; set; }
public int VehicleId { get; set; }
public DateTime Date { get; set; }
public int InitialMileage { get; set; }
public int Mileage { get; set; }
public int DistanceTraveled { get { return Mileage - InitialMileage; } }
public string Notes { get; set; }
public List<string> Tags { get; set; } = new List<string>();
public List<UploadedFiles> Files { get; set; } = new List<UploadedFiles>();

View File

@@ -5,11 +5,12 @@
public int Id { get; set; }
public int VehicleId { get; set; }
public string Date { get; set; } = DateTime.Now.ToShortDateString();
public int InitialMileage { get; set; }
public int Mileage { get; set; }
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 OdometerRecord ToOdometerRecord() { return new OdometerRecord { Id = Id, VehicleId = VehicleId, Date = DateTime.Parse(Date), Mileage = Mileage, Notes = Notes, Files = Files, Tags = Tags, ExtraFields = ExtraFields }; }
public OdometerRecord ToOdometerRecord() { return new OdometerRecord { Id = Id, VehicleId = VehicleId, Date = DateTime.Parse(Date), Mileage = Mileage, Notes = Notes, Files = Files, Tags = Tags, ExtraFields = ExtraFields, InitialMileage = InitialMileage }; }
}
}

View File

@@ -5,8 +5,6 @@
public int MonthId { get; set; }
public string MonthName { get; set; }
public decimal Cost { get; set; }
public int MaxMileage { get; set; }
public int MinMileage { get; set; }
public int DistanceTraveled { get; set; }
}
}

View File

@@ -11,6 +11,7 @@
public string Type { get; set; }
public string Priority { get; set; }
public string Progress { get; set; }
public string InitialOdometer { get; set; }
public string Odometer { get; set; }
public string Description { get; set; }
public string Notes { get; set; }
@@ -50,6 +51,7 @@
public class OdometerRecordExportModel
{
public string Date { get; set; }
public string InitialOdometer { get; set; }
public string Odometer { get; set; }
public string Notes { get; set; }
public string Tags { get; set; }