Files
2020-09-20 22:07:13 -04:00

35 lines
875 B
C#

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
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; }
}
}