rename to projecting

This commit is contained in:
2026-06-16 18:04:55 +02:00
parent da7b320032
commit bcde4178df
14778 changed files with 3658 additions and 3642 deletions

View File

@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace ProjecThing.Models.Project
{
public enum ProjectPartStatus
{
[Display(Name = "Odprto")]
Opened = 0,
[Display(Name = "V izdelavi")]
InProduction = 1,
[Display(Name = "Zaključeno")]
Finished = 2,
[Display(Name = "Odpremljeno")]
Shipped = 3
}
public class ProjectPart
{
[Key]
public int IdProjectPart { get; set; }
[Required]
[ForeignKey("Project")]
public int IdProjectFk { get; set; }
[Required]
[Display(Name = "Naziv")]
public string Title { get; set; }
[Display(Name = "Opis")]
public string Description { get; set; }
[Required]
[Display(Name = "Status")]
public ProjectPartStatus Status { get; set; } = ProjectPartStatus.Opened;
[Display(Name = "Datum zaključka")]
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
public DateTime? FinishedDate { get; set; }
[Display(Name = "Datum odpreme")]
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy}", ApplyFormatInEditMode = true)]
public DateTime? ShippedDate { get; set; }
[Display(Name = "Pot načrtov")]
public string PathOfPlans { get; set; }
[Required]
public int ProjectPartNumber { get; set; } = 0;
[NotMapped]
public string ProjectPartNumberFormatted => (Project != null ? Project.ProjectNumberFormatted : "") + $"-{ProjectPartNumber:D4}";
// ForeignKey
public Project Project { get; set; }
// ProjectPartItem
[InverseProperty("ProjectPart")]
public virtual ICollection<ProjectPartItem> ProjectPartProjectPartItem { get; set; }
}
}