Add vehicle service model and migration

This commit is contained in:
2015-10-07 23:28:58 -04:00
parent 41adb2298b
commit 306381b3c6
5 changed files with 224 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace MileageTraker.Web.Models
{
public class VehicleService
{
[Key]
public int VehicleServiceId { get; set; }
[Required]
public virtual Vehicle Vehicle { get; set; }
[Required]
[DataType(DataType.Date)]
[DisplayFormatAttribute(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]
public DateTime InvoiceDate { get; set; }
[Required]
[StringLength(64, MinimumLength = 3, ErrorMessage = "Minimum 3 characters")]
public string ServiceCenterName { get; set; }
[Required]
[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; }
}
}