39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EveryThing.Models.Vehicle
|
|
{
|
|
public class VehicleMeterReading
|
|
{
|
|
[Key]
|
|
public int IdVehicle { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey("Vehicle")]
|
|
public int IdVehicleFk { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey("Kilometrov")]
|
|
public int Mileage { get; set; }
|
|
|
|
[Display(Name = "Ustvarjeno")]
|
|
public string CreatedBy { get; set; }
|
|
|
|
[Required(ErrorMessage = "Polje datum vnosa je obvezno")]
|
|
[DataType(DataType.Date)]
|
|
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
|
|
[Display(Name = "Datum vnosa")]
|
|
public DateTime DateAdded { get; set; }
|
|
|
|
[Display(Name = "Opomba")]
|
|
public string Note { get; set; }
|
|
|
|
//ForeignKey
|
|
public Vehicle Vehicle { get; set; }
|
|
}
|
|
}
|