Prvi commit
This commit is contained in:
79
EveryThing/Models/Vehicle/VehicleIssue.cs
Normal file
79
EveryThing/Models/Vehicle/VehicleIssue.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
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 enum VehicleIssuePriority
|
||||
{
|
||||
[Display(Name = "(1) Zelo nizko")]
|
||||
VeryLow = 0,
|
||||
|
||||
[Display(Name = "(2) Nizko")]
|
||||
Low = 1,
|
||||
|
||||
[Display(Name = "(3) Normalno")]
|
||||
Normal = 2,
|
||||
|
||||
[Display(Name = "(4) Urgentno")]
|
||||
Urgent = 3,
|
||||
|
||||
[Display(Name = "(5) Kritično")]
|
||||
Critical = 4
|
||||
}
|
||||
|
||||
public enum VehicleIssueStatus
|
||||
{
|
||||
[Display(Name = "Na čakanju")]
|
||||
Pending = 0,
|
||||
|
||||
[Display(Name = "V teku")]
|
||||
Processing = 1,
|
||||
|
||||
[Display(Name = "Urejeno")]
|
||||
Fixed = 2
|
||||
}
|
||||
|
||||
public class VehicleIssue
|
||||
{
|
||||
[Key]
|
||||
public int IdVehicleIssue { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Izbira prioritete je obvezna")]
|
||||
[Display(Name = "Prioriteta")]
|
||||
public VehicleIssuePriority Priority { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Izbira stanja je obvezna")]
|
||||
[Display(Name = "Status")]
|
||||
public VehicleIssueStatus Status { get; set; }
|
||||
|
||||
[ForeignKey("Employee")]
|
||||
[Display(Name = "Prijavil")]
|
||||
public int? IdEmployeeFk { get; set; }
|
||||
|
||||
[Required]
|
||||
[ForeignKey("Vehicle")]
|
||||
[Display(Name = "Vozilo")]
|
||||
public int IdVehicleFk { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Polje datum prijave je obvezno")]
|
||||
[DataType(DataType.Date)]
|
||||
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
|
||||
[Display(Name = "Datum prijave")]
|
||||
public DateTime DateReported { get; set; }
|
||||
|
||||
[Display(Name = "Opis")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Display(Name = "Opomba")]
|
||||
public string Note { get; set; }
|
||||
|
||||
//ForeignKey
|
||||
public CodeTableEmployee Employee { get; set; }
|
||||
public Vehicle Vehicle { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user