Files
everything/ProjecThing/Models/CodeTable/CodeTableDepartement.cs
2026-06-16 18:04:55 +02:00

38 lines
973 B
C#

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.CodeTable
{
public class CodeTableDepartement
{
[Key]
public int IdDepartement { get; set; }
[Required]
[ForeignKey("Company")]
public int IdCompanyFk { get; set; }
[Required]
[Display(Name = "Naziv")]
public string Title { get; set; }
[Required]
public bool Active { get; set; }
//ForeignKey
public CodeTableCompany Company { get; set; }
//Employee
[InverseProperty("Departement")]
public virtual ICollection<CodeTableEmployee> DepartementEmployee { get; set; }
//Vehicle
[InverseProperty("Departement")]
public virtual ICollection<Vehicle.Vehicle> DepartementVehicle { get; set; }
}
}