This commit is contained in:
David Štaleker
2023-05-23 14:57:29 +02:00
parent a45fe73754
commit 257f8730b2
10 changed files with 2556 additions and 119 deletions

View File

@@ -17,15 +17,15 @@ namespace EveryThing.Models.CodeTable
[ForeignKey("Company")]
public int IdCompanyFk { get; set; }
[Required]
[Display(Name = "Vrsta")]
public string Type { get; set; }
[Required]
[Display(Name = "Vsebina")]
public string Content { get; set; }
// ForeingKey
public CodeTableCompany Company { get; set; }
// Partner
[InverseProperty("CodeTablePrePostText")]
public virtual ICollection<CodeTablePrePostTextLink> CodeTablePrePostTextLinks { get; set; }
}
}

View File

@@ -0,0 +1,47 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EveryThing.Models.CodeTable
{
public class CodeTablePrePostTextLink
{
public enum TypeEnum
{
[Display(Name = "Uvodni")]
PreText = 1,
[Display(Name = "Zaključni")]
PostText = 2
}
public enum LinkEnum
{
[Display(Name = "Nalog za naklad")]
TransportLoadingOrder = 1,
[Display(Name = "Fakturiranje računi")]
InvoicesBills = 2,
[Display(Name = "Fakturiranje naročila dobaviteljem")]
InvoicesSuppliersOrders = 3,
[Display(Name = "Fakturiranje naročila kupcev")]
InvoicesBuyersOrders = 4
}
[Key]
public int IdPrePostTextLink { get; set; }
[Required]
[ForeignKey("CodeTablePrePostText")]
public int IdPrePostTextFk { get; set; }
[Required]
[Display(Name = "Vrsta")]
public TypeEnum Type { get; set; }
[Required]
[Display(Name = "Veza")]
public LinkEnum Link { get; set; }
// ForeingKey
public CodeTablePrePostText CodeTablePrePostText { get; set; }
}
}