64 lines
1.8 KiB
C#
64 lines
1.8 KiB
C#
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
|
|
{
|
|
public enum GeneralNoteStatus
|
|
{
|
|
[Display(Name = "Na čakanju")]
|
|
Pending = 0,
|
|
|
|
[Display(Name = "V teku")]
|
|
Processing = 1,
|
|
|
|
[Display(Name = "Obdelano")]
|
|
Fixed = 2
|
|
}
|
|
|
|
public class GeneralNote
|
|
{
|
|
[Key]
|
|
public int IdNote { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey("Company")]
|
|
public int IdCompanyFk { get; set; }
|
|
|
|
[Required(ErrorMessage = "Izbira stanja je obvezna")]
|
|
[Display(Name = "Status")]
|
|
public GeneralNoteStatus Status { get; set; }
|
|
|
|
[ForeignKey("Employee")]
|
|
[Display(Name = "Delavec")]
|
|
public int? IdEmployeeFk { get; set; }
|
|
|
|
[ForeignKey("Vehicle")]
|
|
[Display(Name = "Vozilo")]
|
|
public int? IdVehicleFk { 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 DateSubmitted { get; set; }
|
|
|
|
[DataType(DataType.Date)]
|
|
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
|
|
[Display(Name = "Datum opomnika")]
|
|
public DateTime? DateReminder { get; set; }
|
|
|
|
[Display(Name = "Opis")]
|
|
public string Description { get; set; }
|
|
|
|
//ForeignKey
|
|
public CodeTableEmployee Employee { get; set; }
|
|
public Vehicle.Vehicle Vehicle { get; set; }
|
|
public CodeTableCompany Company { get; set; }
|
|
}
|
|
}
|