- Dodati operacije na pozicijo dela projekta
- Dodatna tabela z operacijami in stanjem (končano/nekončano) - šifrant operacij - možnost določevanje privzetih operacij - Opombe na pozicij dela projekta - Pogled kooperacij na poziciji dela projekta - Izpisano številka kooperacije in kooperant
This commit is contained in:
23
EveryThing/Models/CodeTable/CodeTableOperation.cs
Normal file
23
EveryThing/Models/CodeTable/CodeTableOperation.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using EveryThing.Models.Project;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace EveryThing.Models.CodeTable
|
||||
{
|
||||
public class CodeTableOperation
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Naziv")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Display(Name = "Privzeta operacija")]
|
||||
public bool Default { get; set; }
|
||||
|
||||
[InverseProperty("Operation")]
|
||||
public virtual ICollection<ProjectPartItemOperation> ProjectPartItemOperation { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace EveryThing.Models.Invoice
|
||||
[Display(Name = "Partner")]
|
||||
public int? IdPartnerFk { get; set; }
|
||||
|
||||
[ForeignKey("Projekt")]
|
||||
[ForeignKey("Project")]
|
||||
[Display(Name = "Projekt")]
|
||||
public int? IdProjectFk { get; set; }
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace EveryThing.Models.Invoice
|
||||
public CodeTableCompany Company { get; set; }
|
||||
|
||||
public CodeTablePartner Partner { get; set; }
|
||||
public Project.Project Project{ get; set; }
|
||||
public Project.Project Project { get; set; }
|
||||
|
||||
// InvoicePart
|
||||
[InverseProperty("Invoice")]
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using EveryThing.Models.CodeTable;
|
||||
using EveryThing.Models.Invoice;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace EveryThing.Models.Project
|
||||
{
|
||||
@@ -161,6 +162,9 @@ namespace EveryThing.Models.Project
|
||||
[Display(Name = "Spremenjeno")]
|
||||
public DateTime DateModified { get; set; } = DateTime.Now;
|
||||
|
||||
[Display(Name = "Opomba")]
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
[Required]
|
||||
public int ProjectPartItemNumber { get; set; } = 0;
|
||||
@@ -177,5 +181,8 @@ namespace EveryThing.Models.Project
|
||||
//Invoice item
|
||||
[InverseProperty("ProjectPartItem")]
|
||||
public virtual ICollection<InvoiceItem> InvoiceItem { get; set; }
|
||||
|
||||
[InverseProperty("ProjectPartItem")]
|
||||
public virtual ICollection<ProjectPartItemOperation> ProjectPartItemOperation { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
31
EveryThing/Models/Project/ProjectPartItemOperation.cs
Normal file
31
EveryThing/Models/Project/ProjectPartItemOperation.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using EveryThing.Models.CodeTable;
|
||||
|
||||
namespace EveryThing.Models.Project
|
||||
{
|
||||
public class ProjectPartItemOperation
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[ForeignKey("ProjectPartItem")]
|
||||
public int IdProjectPartItemFk { get; set; }
|
||||
|
||||
[Required]
|
||||
[ForeignKey("Operation")]
|
||||
public int IdCodeTableOperationFk { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Finished { get; set; }
|
||||
|
||||
[Required]
|
||||
public short Order { get; set; }
|
||||
|
||||
|
||||
public CodeTableOperation Operation { get; set; }
|
||||
public ProjectPartItem ProjectPartItem { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user