Add vehicle recall

This commit is contained in:
2020-09-20 22:07:13 -04:00
parent b5589103ec
commit 6f031c5cb6
34 changed files with 890 additions and 45 deletions
+22
View File
@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace MileageTraker.Web.Models
{
public class VehicleRecall
{
[Key]
public int VehicleRecallId { get; set; }
[Required]
public virtual Vehicle Vehicle { get; set; }
[Required]
[StringLength(128, MinimumLength = 3)]
public string Identifier { get; set; }
[Required]
[StringLength(128, MinimumLength = 3, ErrorMessage = "Minimum 3 characters")]
public string Description { get; set; }
public virtual VehicleService CompletedService { get; set; }
}
}
+4 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace MileageTraker.Web.Models
{
@@ -8,7 +9,7 @@ namespace MileageTraker.Web.Models
[Key]
public int VehicleServiceId { get; set; }
[Required]
[Required]
public virtual Vehicle Vehicle { get; set; }
[Required]
@@ -24,10 +25,11 @@ namespace MileageTraker.Web.Models
[StringLength(32)]
public string InvoiceNumber { get; set; }
[Required]
public decimal Price { get; set; }
[StringLength(64, MinimumLength = 3, ErrorMessage = "Minimum 3 characters")]
public string Description { get; set; }
}
}
}