Added service record functionality.

This commit is contained in:
ivancheahhh
2024-01-01 12:01:05 -07:00
parent 9f195e44a2
commit 28268cffd5
124 changed files with 15251 additions and 29 deletions

14
Models/ServiceRecord.cs Normal file
View File

@@ -0,0 +1,14 @@
namespace CarCareTracker.Models
{
public class ServiceRecordInput
{
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 ServiceRecord ToServiceRecord() { return new ServiceRecord { Id = Id, VehicleId = VehicleId, Date = DateTime.Parse(Date), Cost = Cost, Mileage = Mileage, Description = Description, Notes = Notes }; }
}
}

View File

@@ -0,0 +1,13 @@
namespace CarCareTracker.Models
{
public class ServiceRecord
{
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; }
}
}