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

namespace DAL.Models.Entities
{
    public partial class EmployeeToWebApp : BaseEntity
    {
        public int EmployeeToWebAppId { get; set; }
        public int EmployeeId { get; set; }
        public int WebAppId { get; set; }

        public int WebAppRoleId { get; set; }
        public int? DepartmentId { get; set; }

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

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

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

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

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

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

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

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

        //generic ToString()
        public override string ToString() => $"EmployeeToWebAppId: {GetEntityId()}; EmployeeId: {EmployeeId}; WebAppId: {WebAppId}";

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