using HRD.WebApi.DAL;
using System.ComponentModel.DataAnnotations.Schema;

namespace DAL.Models.Entities
{
    public partial class Department : BaseEntity
    {
        public int DepartmentId { get; set; }
        public string DepartmentName { get; set; }
        public int CostCentreId { get; set; }
        public int DepartmentTypeId { get; set; }
        public int? HeadofDepartmentId { get; set; }
        public int? ExecutiveDirectorId { get; set; }
        public int? ManagingDirectorId { get; set; }
        public string DepartmentNameFolder { get; set; }
        public string AdGroupDepartmentName { get; set; }
        public int? ClientId { get; set; }
        public bool IsVirtual { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public string CostCentre { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public string HeadofDepartment { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public string ExecutiveDirector { get; set; }

        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public string ManagingDirector { get; set; }

        //generic Id
        public override int GetEntityId() => DepartmentId;

        //generic ToString()
        public override string ToString() => $"DepartmentId: {GetEntityId()}; Name: {DepartmentName}";

        //generic EntityInfo()
        public override string EntityInfo() => base.EntityInfo();
    }
}