prvi
This commit is contained in:
42
EveryThing/Models/DocumentType.cs
Normal file
42
EveryThing/Models/DocumentType.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
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 DocumentTypeReference
|
||||
{
|
||||
Vehicle = 0,
|
||||
Employee = 1
|
||||
}
|
||||
|
||||
public class DocumentType
|
||||
{
|
||||
[Key]
|
||||
public int IdDocumentType { get; set; }
|
||||
|
||||
[ForeignKey("Company")]
|
||||
public int? IdCompanyFk { get; set; }
|
||||
|
||||
[Required]
|
||||
public DocumentTypeReference DocumentTypeReference { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Naziv")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Active { get; set; }
|
||||
|
||||
//ForeignKey
|
||||
public CodeTableCompany Company { get; set; }
|
||||
|
||||
//Document
|
||||
[InverseProperty("DocumentType")]
|
||||
public virtual ICollection<Document> DocumentTypeDocument { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user