Added Confirmation before deleting vehicle, started work on collisions.

This commit is contained in:
ivancheahhh
2024-01-03 09:57:03 -07:00
parent f83d677e84
commit 9381da5d17
9 changed files with 79 additions and 15 deletions

14
Models/CollisionRecord.cs Normal file
View File

@@ -0,0 +1,14 @@
namespace CarCareTracker.Models
{
public class CollisionRecord
{
public int Id { get; set; }
public int VehicleId { get; set; }
public DateTime Date { get; set; }
public int Mileage { get; set; }
public string Description { get; set; }
public decimal Cost { get; set; }
public string Notes { get; set; }
public List<UploadedFiles> Files { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
namespace CarCareTracker.Models
{
public class CollisionRecordInput
{
public int Id { get; set; }
public int VehicleId { get; set; }
public string Date { get; set; }
public int Mileage { get; set; }
public string Description { get; set; }
public decimal Cost { get; set; }
public string Notes { get; set; }
public List<UploadedFiles> Files { get; set; } = new List<UploadedFiles>();
public CollisionRecord ToServiceRecord() { return new CollisionRecord { Id = Id, VehicleId = VehicleId, Date = DateTime.Parse(Date), Cost = Cost, Mileage = Mileage, Description = Description, Notes = Notes, Files = Files }; }
}
}