+ Pred kreiranjem povpraševanja vprašaj za partnerja + Prikaz TOP 100 (predolgo nalaga) + Dodaj Sorovec na Urejanje Artikla (zadnji surovec) + V Urejanju artikla popravi opis v pot dokumentov + Kooperant
57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using EveryThing.Models.Project;
|
|
|
|
namespace EveryThing.Models.CodeTable
|
|
{
|
|
public enum CodeTableItemType
|
|
{
|
|
[Display(Name = "Produkt")]
|
|
Product = 0,
|
|
|
|
[Display(Name = "Material")]
|
|
Material = 1
|
|
}
|
|
public class CodeTableItem
|
|
{
|
|
[Key]
|
|
public int IdItem { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey("Company")]
|
|
public int IdCompanyFk { get; set; }
|
|
|
|
[Required]
|
|
[Display(Name = "Naziv")]
|
|
public string Title { get; set; }
|
|
|
|
[Display(Name = "Pot dokumentov")]
|
|
public string Description { get; set; }
|
|
|
|
[Required]
|
|
[Display(Name = "Aktiven")]
|
|
public bool Active { get; set; }
|
|
|
|
[Required]
|
|
[Display(Name = "Tip")]
|
|
public CodeTableItemType CodeTableItemType { get; set; } = CodeTableItemType.Product;
|
|
|
|
// ForeignKey
|
|
public CodeTableCompany Company { get; set; }
|
|
|
|
// ProjectPartItem
|
|
[InverseProperty("Item")]
|
|
public virtual ICollection<ProjectPartItem> ItemProjectPartItem { get; set; }
|
|
|
|
// ProjectPartItem
|
|
[InverseProperty("Material")]
|
|
public virtual ICollection<ProjectPartItem> ItemProjectPartItemMaterial { get; set; }
|
|
|
|
// InoviceItem
|
|
[InverseProperty("Item")]
|
|
public virtual ICollection<Invoice.InvoiceItem> InvoiceItem { get; set; }
|
|
}
|
|
}
|