Prvi commit

This commit is contained in:
David Štaleker
2023-05-12 09:00:07 +02:00
parent d3ffe93e42
commit 03b92525d7
14757 changed files with 9251133 additions and 53 deletions

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
using EveryThing.Models.CodeTable;
namespace EveryThing.Models.Vehicle
{
public class VehicleDrive
{
[Key]
public int IdVehicleDrive { get; set; }
[Required]
[ForeignKey("Employee")]
[Display(Name = "Voznik")]
public int IdEmployeeFk { get; set; }
[Required]
[ForeignKey("Vehicle")]
[Display(Name = "Vozilo")]
public int IdVehicleFk { get; set; }
[Required(ErrorMessage = "Polje datum začetka je obvezno")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
[Display(Name = "Datum začetka")]
public DateTime DateStart { get; set; }
[Required(ErrorMessage = "Polje datum konca je obvezno")]
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
[Display(Name = "Datum začetka")]
public DateTime DateEnd { get; set; }
[Required]
[Display(Name = "Začetek")]
public int MileageStart { get; set; }
[Required]
[Display(Name = "Konec")]
public int MileageEnd { get; set; }
[Display(Name = "Opomba")]
public string Note { get; set; }
//ForeignKey
public CodeTableEmployee Employee { get; set; }
public Vehicle Vehicle { get; set; }
}
}