Add vehicle recall
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user