瀏覽代碼

Search Employee

zinab_elgendy 9 月之前
父節點
當前提交
e9c057537b
共有 46 個文件被更改,包括 10366 次插入102 次删除
  1. 29 0
      MTWorkHR.API/Controllers/LookupController.cs
  2. 2 2
      MTWorkHR.API/Controllers/UserController.cs
  3. 18 7
      MTWorkHR.Application/Dtos/Identity/UserAllDto.cs
  4. 5 2
      MTWorkHR.Application/Dtos/Identity/UserDto.cs
  5. 21 0
      MTWorkHR.Application/Dtos/Lookup/CountryDto.cs
  6. 20 0
      MTWorkHR.Application/Dtos/Lookup/IndustryDto.cs
  7. 20 0
      MTWorkHR.Application/Dtos/Lookup/JobTitleDto.cs
  8. 19 0
      MTWorkHR.Application/Dtos/User/UserPagingInputDto.cs
  9. 10 4
      MTWorkHR.Application/Mapper/MappingProfile.cs
  10. 0 45
      MTWorkHR.Application/Services/Base/LookupService.cs
  11. 6 0
      MTWorkHR.Application/Services/Interfaces/ILookupService.cs
  12. 1 1
      MTWorkHR.Application/Services/Interfaces/IUserService.cs
  13. 87 0
      MTWorkHR.Application/Services/User/LookupService.cs
  14. 65 9
      MTWorkHR.Application/Services/User/UserService.cs
  15. 0 20
      MTWorkHR.Core/Entities/Auth/Company.cs
  16. 58 0
      MTWorkHR.Core/Entities/Contract/Contract.cs
  17. 23 0
      MTWorkHR.Core/Entities/User/CountryLookup.cs
  18. 22 0
      MTWorkHR.Core/Entities/User/Industry.cs
  19. 22 0
      MTWorkHR.Core/Entities/User/JobTitle.cs
  20. 22 0
      MTWorkHR.Core/Entities/User/Qualification.cs
  21. 22 0
      MTWorkHR.Core/Entities/User/University.cs
  22. 5 1
      MTWorkHR.Core/IDto/IUserPagingInputDto.cs
  23. 15 0
      MTWorkHR.Core/IRepositories/Lookups/ICountryLookupRepository.cs
  24. 15 0
      MTWorkHR.Core/IRepositories/Lookups/IIndustryRepository.cs
  25. 15 0
      MTWorkHR.Core/IRepositories/Lookups/IJobTitleRepository.cs
  26. 0 0
      MTWorkHR.Core/IRepositories/Lookups/ILeaveTypeRepository.cs
  27. 0 0
      MTWorkHR.Core/IRepositories/Lookups/IOrderTypeRepository.cs
  28. 3 0
      MTWorkHR.Core/IUnitOfWork/IUnitOfWork.cs
  29. 4 0
      MTWorkHR.Core/MTWorkHR.Core.csproj
  30. 75 0
      MTWorkHR.Infrastructure/Configurations/IndustryConfiguration.cs
  31. 53 0
      MTWorkHR.Infrastructure/Configurations/JobTitleConfiguration.cs
  32. 8 0
      MTWorkHR.Infrastructure/DBContext/HRDataContext.cs
  33. 18 3
      MTWorkHR.Infrastructure/Entities/ApplicationUser.cs
  34. 3 0
      MTWorkHR.Infrastructure/InfrastructureServiceRegistration.cs
  35. 2382 0
      MTWorkHR.Infrastructure/Migrations/20240403151641_country.Designer.cs
  36. 192 0
      MTWorkHR.Infrastructure/Migrations/20240403151641_country.cs
  37. 2830 0
      MTWorkHR.Infrastructure/Migrations/20240407125448_JobTitles.Designer.cs
  38. 478 0
      MTWorkHR.Infrastructure/Migrations/20240407125448_JobTitles.cs
  39. 2870 0
      MTWorkHR.Infrastructure/Migrations/20240414154330_altrUserRelations.Designer.cs
  40. 236 0
      MTWorkHR.Infrastructure/Migrations/20240414154330_altrUserRelations.cs
  41. 626 8
      MTWorkHR.Infrastructure/Migrations/HRDataContextModelSnapshot.cs
  42. 19 0
      MTWorkHR.Infrastructure/Repositories/Lookups/CountryLookupRepository.cs
  43. 19 0
      MTWorkHR.Infrastructure/Repositories/Lookups/IndustryRepository.cs
  44. 19 0
      MTWorkHR.Infrastructure/Repositories/Lookups/JobTitleRepository.cs
  45. 0 0
      MTWorkHR.Infrastructure/Repositories/Lookups/LeaveTypeRepository.cs
  46. 9 0
      MTWorkHR.Infrastructure/UnitOfWork/UnitOfWork.cs

+ 29 - 0
MTWorkHR.API/Controllers/LookupController.cs

@@ -33,7 +33,36 @@ namespace MTWorkHR.API.Controllers
             return await _LookupService.GetAllOrderType();
         }
 
+        [HttpGet("GetAllCountries")]
+        [ProducesResponseType(StatusCodes.Status200OK)]
 
+        public async Task<ActionResult<List<CountryDto>>> GetAllCountries()
+        {
+            return await _LookupService.GetAllCountries();
+        }
+
+        [HttpGet("GetAllIndustries")]
+        [ProducesResponseType(StatusCodes.Status200OK)]
 
+        public async Task<ActionResult<List<IndustryDto>>> GetAllIndustries()
+        {
+            return await _LookupService.GetAllIndustries();
+        }
+
+        [HttpGet("GetAllJobTitles")]
+        [ProducesResponseType(StatusCodes.Status200OK)]
+
+        public async Task<ActionResult<List<JobTitleDto>>> GetAllJobTitles()
+        {
+            return await _LookupService.GetAllJobTitles();
+        }
+
+        [HttpGet("CreateCountries")]
+        [ProducesResponseType(StatusCodes.Status200OK)]
+
+        public async Task<ActionResult<List<CountryDto>>> CreateCountries()
+        {
+            return await _LookupService.CreateCountries();
+        }
     }
 }

+ 2 - 2
MTWorkHR.API/Controllers/UserController.cs

@@ -18,9 +18,9 @@ namespace MTWorkHR.API.Controllers
             this._userService = userService;
         }
         [HttpGet("GetAll")]
-        public async Task<ActionResult<List<UserDto>>> GetAll()
+        public async Task<ActionResult<List<UserAllDto>>> GetAll([FromQuery] UserPagingInputDto pagingInput)
         {
-            return Ok( await _userService.GetAll());
+            return Ok( await _userService.GetAll(pagingInput));
         }
         [HttpGet("Get")]
         public async Task<ActionResult<UserDto>> Get(string userId)

+ 18 - 7
MTWorkHR.Application/Dtos/Identity/UserAllDto.cs

@@ -1,6 +1,8 @@
-using MTWorkHR.Core.Global;
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.Global;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -11,16 +13,25 @@ namespace MTWorkHR.Application.Models
     {
         public string? Id { get; set; }
         public string UserName { get; set; }
-        public string FullName { get; set; }
+        public string FirstName { get; set; }
+        public string LastName { get; set; }
+        public string FavoriteName { get; set; }
         public string PhoneNumber { get; set; }
         public string Email { get; set; }
         public string? ManagerId { get; set; }
         public string ManagerName { get; set; }
-        public long? DepartmentId { get; set; }
-        public string DepartmentName { get; set; }
-        public string BranchName { get; set; }
-        public bool IsSalesman { get; set; }
-        public long? HierarchyId { get; set; }
+        public string UniversityName { get; set; }
+        public string QualificationName { get; set; }
+        public string JobTitleName { get; set; }
+        public string IndustryName { get; set; }
+        public string CountryName { get; set; }
+       
+        public long? QualificationId { get; set; }
+        public long? UniversityId { get; set; }
+        public long? JobTitleId { get; set; }
+        public long? IndustryId { get; set; }
+        public long? CountryId { get; set; }
         public bool IsStopped { get; set; }
+
     }
 }

+ 5 - 2
MTWorkHR.Application/Dtos/Identity/UserDto.cs

@@ -29,8 +29,11 @@ namespace MTWorkHR.Application.Models
         public string? FavoriteName { get; set; }
         public string PassportNumber { get; set; }
         public int? QualificationId { get; set; }
-        public string? University { get; set; }
-        public string? JobTitle { get; set; }
+        public int? UniversityId { get; set; }
+        public int? JobTitleId { get; set; }
+        public int? IndustryId { get; set; }
+        public int? CountryId { get; set; }
+
         public decimal TaxNumber { get; set; }
         public decimal IncomeTaxValue { get; set; }
 

+ 21 - 0
MTWorkHR.Application/Dtos/Lookup/CountryDto.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Countries.NET;
+using MTWorkHR.Application.Models;
+using MTWorkHR.Core.Entities.Base;
+using MTWorkHR.Core.Global;
+
+namespace MTWorkHR.Application.Models
+{
+    public class CountryDto :EntityDto
+    {
+        public string NameAr { get; set; }
+        public string NameEn { get; set; }
+        public string Code { get; set; }
+
+    }
+}

+ 20 - 0
MTWorkHR.Application/Dtos/Lookup/IndustryDto.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Countries.NET;
+using MTWorkHR.Application.Models;
+using MTWorkHR.Core.Entities.Base;
+using MTWorkHR.Core.Global;
+
+namespace MTWorkHR.Application.Models
+{
+    public class IndustryDto : EntityDto
+    {
+        public string NameAr { get; set; }
+        public string NameEn { get; set; }
+
+    }
+}

+ 20 - 0
MTWorkHR.Application/Dtos/Lookup/JobTitleDto.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Countries.NET;
+using MTWorkHR.Application.Models;
+using MTWorkHR.Core.Entities.Base;
+using MTWorkHR.Core.Global;
+
+namespace MTWorkHR.Application.Models
+{
+    public class JobTitleDto : EntityDto
+    {
+        public string NameAr { get; set; }
+        public string NameEn { get; set; }
+
+    }
+}

+ 19 - 0
MTWorkHR.Application/Dtos/User/UserPagingInputDto.cs

@@ -0,0 +1,19 @@
+using MTWorkHR.Core.IDto;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MTWorkHR.Application.Models
+{
+    public class UserPagingInputDto : PagingInputDto, IUserPagingInputDto
+    {
+        public long? QualificationId { get; set; }
+        public long? UniversityId { get; set; }
+        public long? JobTitleId { get; set; }
+        public long? IndustryId { get; set; }
+        public long? CountryId { get; set; }
+
+    }
+}

+ 10 - 4
MTWorkHR.Application/Mapper/MappingProfile.cs

@@ -1,4 +1,5 @@
 using AutoMapper;
+using Countries.NET;
 using Microsoft.AspNetCore.Identity;
 using MTWorkHR.Application.Models;
 using MTWorkHR.Core.Entities;
@@ -25,11 +26,13 @@ namespace MTWorkHR.Application.Mapper
 
             CreateMap<ApplicationUser, UserDto>().ForMember(m => m.Password, op => op.Ignore());
             CreateMap<ApplicationUser, UserAllDto>()
-                .ForMember(s => s.ManagerName, o => o.MapFrom(s => s.Manager.FirstName)
-                
-                //.ForMember(s => s.DepartmentName, o => o.MapFrom(s => GlobalInfo.lang == "ar" ? s.Department.NameAr : s.Department.NameEn)
+                .ForMember(s => s.QualificationName, o => o.MapFrom(s => s.Qualification ==null ? "" : GlobalInfo.lang == "ar" ? s.Qualification.NameAr : s.Qualification.NameEn))
+                .ForMember(s => s.JobTitleName, o => o.MapFrom(s => s.JobTitle ==null ? "" : GlobalInfo.lang == "ar" ? s.JobTitle.NameAr : s.JobTitle.NameEn))
+                .ForMember(s => s.IndustryName, o => o.MapFrom(s => s.Industry ==null ? "" : GlobalInfo.lang == "ar" ? s.Industry.NameAr : s.Industry.NameEn))
+                .ForMember(s => s.CountryName, o => o.MapFrom(s => s.Country ==null ? "" : GlobalInfo.lang == "ar" ? s.Country.NameAr : s.Country.NameEn))
+                .ForMember(s => s.UniversityName, o => o.MapFrom(s => s.University == null ? "" : GlobalInfo.lang == "ar" ? s.University.NameAr : s.University.NameEn)
                 );
-
+            
             CreateMap<UserUpdateDto, ApplicationUser>()
                 .ForMember(m => m.UserRoles, op => op.Ignore())
                // .ForMember(m => m.UserBranchs, op => op.Ignore())
@@ -77,6 +80,9 @@ namespace MTWorkHR.Application.Mapper
             CreateMap<OrderType, OrderTypeDto>().ReverseMap();
             CreateMap<LeaveType, LeaveTypeDto>().ReverseMap();
             CreateMap<Company, CompanyDto>().ReverseMap().ForMember(d => d.CreateDate, o => o.Ignore());
+            CreateMap<CountryLookup, CountryDto>().ReverseMap();
+            CreateMap<Industry, IndustryDto>().ReverseMap();
+            CreateMap<JobTitle, JobTitleDto>().ReverseMap();
 
 
         }

+ 0 - 45
MTWorkHR.Application/Services/Base/LookupService.cs

@@ -1,45 +0,0 @@
-using Microsoft.AspNetCore.Identity;
-using Microsoft.AspNetCore.WebUtilities;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Configuration;
-using MTWorkHR.Application.Identity;
-using MTWorkHR.Application.Mapper;
-using MTWorkHR.Application.Models;
-using MTWorkHR.Core.Global;
-using MTWorkHR.Core.IRepositories;
-using MTWorkHR.Core.UnitOfWork;
-using MTWorkHR.Infrastructure.Entities;
-using MTWorkHR.Application.Services.Interfaces;
-using MTWorkHR.Core.Email;
-using MTWorkHR.Core.Entities;
-using MTWorkHR.Infrastructure.UnitOfWorks;
-using MTWorkHR.Core.IDto;
-using MTWorkHR.Infrastructure.Repositories;
-
-namespace MTWorkHR.Application.Services
-{
-    public class LookupService : ILookupService
-    {
-        private readonly IUnitOfWork _unitOfWork;
-
-        public LookupService(IUnitOfWork unitOfWork)
-        {
-            _unitOfWork = unitOfWork;
-        }
-
-        public async Task<List<LeaveTypeDto>> GetAllLeaveType()
-        {
-            var result = await _unitOfWork.LeaveType.GetAllAsync();
-            var list = MapperObject.Mapper.Map<List<LeaveTypeDto>>(result.Item1);
-            return list;
-        }
-
-        public async Task<List<OrderTypeDto>> GetAllOrderType()
-        {
-            var entity = await _unitOfWork.OrderType.GetAllAsync();
-            var response = MapperObject.Mapper.Map<List<OrderTypeDto>>(entity.Item1);
-            return response;
-        }
-
-    }
-}

+ 6 - 0
MTWorkHR.Application/Services/Interfaces/ILookupService.cs

@@ -9,5 +9,11 @@ namespace MTWorkHR.Application.Services.Interfaces
     {
         Task<List<OrderTypeDto>> GetAllOrderType();
         Task<List<LeaveTypeDto>> GetAllLeaveType();
+        Task<List<CountryDto>> GetAllCountries();
+        Task<List<CountryDto>> CreateCountries();
+
+        Task<List<IndustryDto>> GetAllIndustries();
+        Task<List<JobTitleDto>> GetAllJobTitles();
+
     }
 }

+ 1 - 1
MTWorkHR.Application/Services/Interfaces/IUserService.cs

@@ -10,7 +10,7 @@ namespace MTWorkHR.Application.Identity
 {
     public interface IUserService
     {
-        Task<List<UserDto>> GetAll();
+        Task<PagingResultDto<UserAllDto>> GetAll(UserPagingInputDto PagingInputDto);
         Task<UserDto> GetById(string userId);
         Task<List<UserDto>> GetAllEmployees();
 

+ 87 - 0
MTWorkHR.Application/Services/User/LookupService.cs

@@ -0,0 +1,87 @@
+using Microsoft.AspNetCore.Identity;
+using Microsoft.AspNetCore.WebUtilities;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Configuration;
+using MTWorkHR.Application.Identity;
+using MTWorkHR.Application.Mapper;
+using MTWorkHR.Application.Models;
+using MTWorkHR.Core.Global;
+using MTWorkHR.Core.IRepositories;
+using MTWorkHR.Core.UnitOfWork;
+using MTWorkHR.Infrastructure.Entities;
+using MTWorkHR.Application.Services.Interfaces;
+using MTWorkHR.Core.Email;
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Infrastructure.UnitOfWorks;
+using MTWorkHR.Core.IDto;
+using MTWorkHR.Infrastructure.Repositories;
+using MTWorkHR.Core.Entities.Base;
+
+namespace MTWorkHR.Application.Services
+{
+    public class LookupService : ILookupService
+    {
+        private readonly IUnitOfWork _unitOfWork;
+
+        public LookupService(IUnitOfWork unitOfWork)
+        {
+            _unitOfWork = unitOfWork;
+        }
+
+        public async Task<List<LeaveTypeDto>> GetAllLeaveType()
+        {
+            var result = await _unitOfWork.LeaveType.GetAllAsync();
+            var list = MapperObject.Mapper.Map<List<LeaveTypeDto>>(result.Item1);
+            return list;
+        }
+
+        public async Task<List<OrderTypeDto>> GetAllOrderType()
+        {
+            var entity = await _unitOfWork.OrderType.GetAllAsync();
+            var response = MapperObject.Mapper.Map<List<OrderTypeDto>>(entity.Item1);
+            return response;
+        }
+        public async Task<List<CountryDto>> GetAllCountries()
+        {
+            var entity = await _unitOfWork.CountryLookup.GetAllAsync();
+            var response = MapperObject.Mapper.Map<List<CountryDto>>(entity.Item1);
+            return response;
+        }
+
+        public async Task<List<IndustryDto>> GetAllIndustries()
+        {
+            var entity = await _unitOfWork.Industry.GetAllAsync();
+            var response = MapperObject.Mapper.Map<List<IndustryDto>>(entity.Item1);
+            return response;
+        }
+
+        public async Task<List<JobTitleDto>> GetAllJobTitles()
+        {
+            var entity = await _unitOfWork.JobTitle.GetAllAsync();
+            var response = MapperObject.Mapper.Map<List<JobTitleDto>>(entity.Item1);
+            return response;
+        }
+
+        public async Task<List<CountryDto>> CreateCountries()
+        {
+            // init the service
+            var service = new Countries.NET.CountriesService();
+
+            // to get the list of all countries:
+            var countriesEnglish = service.GetAsKeyValue();
+            var countriesArabic = service.GetAsKeyValue("ara", true);
+            var countries = countriesArabic.Select(x => new CountryLookup { Code = x.Key, NameAr = x.Value }).ToList();
+            foreach(var c in countries)
+            {
+                var countryEng = countriesEnglish.FirstOrDefault(cc => cc.Key == c.Code);
+                c.NameEn = countryEng.Value;
+            }
+            await _unitOfWork.CountryLookup.AddRangeAsync(countries);
+            await _unitOfWork.CompleteAsync();
+            var response = MapperObject.Mapper.Map<List<CountryDto>>(countries);
+
+            return response;
+        }
+
+    }
+}

+ 65 - 9
MTWorkHR.Application/Services/User/UserService.cs

@@ -16,6 +16,8 @@ using MTWorkHR.Infrastructure.Entities;
 using static Org.BouncyCastle.Crypto.Engines.SM2Engine;
 using System.Web;
 using System.Data;
+using MTWorkHR.Core.IDto;
+using System.Linq.Dynamic.Core;
 
 namespace MTWorkHR.Application.Services
 {
@@ -57,18 +59,72 @@ namespace MTWorkHR.Application.Services
             return response;
         }
 
-        public async Task<List<UserDto>> GetAll()
+        //public async Task<List<UserDto>> GetAll(PagingInputDto pagingInput)
+        //{
+        //    var employees = await _userManager.GetUsersInRoleAsync("Employee");
+        //    return employees.Select(e => new UserDto
+        //    {
+        //        Email = e.Email,
+        //        FirstName = e.FirstName,
+        //        LastName = e.LastName,
+        //        Id = e.Id
+        //    }).ToList();
+        //}
+        public virtual async Task<PagingResultDto<UserAllDto>> GetAll(UserPagingInputDto PagingInputDto)
         {
-            var employees = await _userManager.GetUsersInRoleAsync("Employee");
-            return employees.Select(e => new UserDto
+            var query = _userManager.Users
+                .Include(u => u.Qualification).Include(u => u.JobTitle).Include(u => u.University).Include(u => u.Industry).Include(u => u.Country)
+                .AsQueryable();
+
+            if (PagingInputDto.Filter != null)
             {
-                Email = e.Email,
-                FirstName = e.FirstName,
-                LastName = e.LastName,
-                Id = e.Id
-            }).ToList();
-        }
+                var filter = PagingInputDto.Filter;
+                query = query.Where(u => 
+                    u.UserName.Contains(filter) ||
+                    u.Email.Contains(filter) ||
+                    u.FirstName.Contains(filter) ||
+                    u.LastName.Contains(filter) ||
+                    u.FavoriteName.Contains(filter) ||
+                    u.PhoneNumber.Contains(filter));
+            }
+            if (PagingInputDto.IndustryId != null)
+            {
+                query = query.Where(u => u.IndustryId == PagingInputDto.IndustryId);
+            }
+            if (PagingInputDto.QualificationId != null)
+            {
+                query = query.Where(u => u.QualificationId == PagingInputDto.QualificationId);
+            }
+            if (PagingInputDto.JobTitleId != null)
+            {
+                query = query.Where(u => u.JobTitleId == PagingInputDto.JobTitleId);
+            }
+            if (PagingInputDto.UniversityId != null)
+            {
+                query = query.Where(u => u.UniversityId == PagingInputDto.UniversityId);
+            }
+            if (PagingInputDto.CountryId != null)
+            {
+                query = query.Where(u => u.CountryId == PagingInputDto.CountryId);
+            }
+
+            var order = query.OrderBy(PagingInputDto.OrderByField + " " + PagingInputDto.OrderType);
 
+            var page = order.Skip((PagingInputDto.PageNumber * PagingInputDto.PageSize) - PagingInputDto.PageSize).Take(PagingInputDto.PageSize);
+
+            var total = await query.CountAsync();
+
+            var list = MapperObject.Mapper
+                .Map<IList<UserAllDto>>(await page.ToListAsync());
+
+            var response = new PagingResultDto<UserAllDto>
+            {
+                Result = list,
+                Total = total
+            };
+
+            return response;
+        }
         public async Task<List<UserDto>> GetAllEmployees()
         {
             var employees = await _userManager.GetUsersInRoleAsync("Employee");

+ 0 - 20
MTWorkHR.Core/Entities/Auth/Company.cs

@@ -1,20 +0,0 @@
-using MTWorkHR.Core.Entities.Base;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace MTWorkHR.Core.Entities
-{
-    public class Company : FullAuditEntity
-    {
-        public string UserId { get; set; }
-        [Filter]
-        public string CompanyName { get; set; }
-        [Filter]
-        public string CRNumber { get; set; }
-        public int TaxNumber { get; set; }
-    }
-}

+ 58 - 0
MTWorkHR.Core/Entities/Contract/Contract.cs

@@ -0,0 +1,58 @@
+using MTWorkHR.Core.Entities.Base;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MTWorkHR.Infrastructure.Entities
+{
+    public class Contract : FullAuditEntity
+    {
+        public string FirstName { get; set; }
+        public string MiddleName { get; set; }
+        public string LastName { get; set; }
+        public string Email { get; set; }
+
+        public int Nationality { get; set; }
+        public int LivingCountry { get; set; }
+      
+        public bool IsVisaNeeded { get; set; } = false;
+
+
+        public string? EducationLevel { get; set; }
+        public string? LinkedInLink { get; set; }
+        public int? NoOfDependent { get; set; }
+        //Job Details-----------------
+        public string? SeniorityLevel { get; set; }
+        public string? JobTitle { get; set; }
+        public string? JobScope { get; set; }
+
+
+        //Compensation----------------------
+
+
+        public decimal? GrossAnnualBaseSalary { get; set; }
+
+        public bool? AddSigningBonus { get; set; }
+        public bool? AddAnnualVariableCompensation { get; set; }
+        public bool? FixedAllowances { get; set; }
+        public DateTime? StartDate { get; set; }
+
+
+        public bool FullTime { get; set; } = true; //full-time that will be 40 hours , part-time will be add it manually
+        public int EmployeeTypeHours { get; set; } = 40; //full-time that will be 40 hours , part-time will be add it manually
+
+        public int PaidVacationDays { get; set; }
+        public int SickDays { get; set; }
+        public bool EmploymentTerms { get; set; }
+        public int ProbationPeriod { get; set; }
+        public int Gender { get; set; }
+        public DateTime? DateOfBirth { get; set; }
+
+
+        public bool IsSkilled { get; set; }
+
+    }
+}

+ 23 - 0
MTWorkHR.Core/Entities/User/CountryLookup.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Core.Entities.Base;
+
+namespace MTWorkHR.Core.Entities
+{
+    public class CountryLookup : Entity
+    {
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameAr { get; set; }
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameEn { get; set; }
+        public string Code { get; set; }
+    }
+}

+ 22 - 0
MTWorkHR.Core/Entities/User/Industry.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Core.Entities.Base;
+
+namespace MTWorkHR.Core.Entities
+{
+    public class Industry : Entity
+    {
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameAr { get; set; }
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameEn { get; set; }
+    }
+}

+ 22 - 0
MTWorkHR.Core/Entities/User/JobTitle.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Core.Entities.Base;
+
+namespace MTWorkHR.Core.Entities
+{
+    public class JobTitle : Entity
+    {
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameAr { get; set; }
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameEn { get; set; }
+    }
+}

+ 22 - 0
MTWorkHR.Core/Entities/User/Qualification.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Core.Entities.Base;
+
+namespace MTWorkHR.Core.Entities
+{
+    public class Qualification : Entity
+    {
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameAr { get; set; }
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameEn { get; set; }
+    }
+}

+ 22 - 0
MTWorkHR.Core/Entities/User/University.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Core.Entities.Base;
+
+namespace MTWorkHR.Core.Entities
+{
+    public class University : Entity
+    {
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameAr { get; set; }
+        [Required]
+        [MaxLength(250)]
+        [Filter]
+        public string NameEn { get; set; }
+    }
+}

+ 5 - 1
MTWorkHR.Core/IDto/IUserPagingInputDto.cs

@@ -4,7 +4,11 @@ namespace MTWorkHR.Core.IDto
 {
     public interface IUserPagingInputDto:IPagingInputDto
     {
-        public long? DepartmentId { get; set; }
+        public long? QualificationId { get; set; }
+        public long? UniversityId { get; set; }
+        public long? JobTitleId { get; set; }
+        public long? IndustryId { get; set; }
+        public long? CountryId { get; set; }
 
     }
 }

+ 15 - 0
MTWorkHR.Core/IRepositories/Lookups/ICountryLookupRepository.cs

@@ -0,0 +1,15 @@
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.IRepositories.Base;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MTWorkHR.Core.IRepositories
+{
+    public interface ICountryLookupRepository : IRepository<CountryLookup>
+    {
+
+    }
+}

+ 15 - 0
MTWorkHR.Core/IRepositories/Lookups/IIndustryRepository.cs

@@ -0,0 +1,15 @@
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.IRepositories.Base;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MTWorkHR.Core.IRepositories
+{
+    public interface IIndustryRepository : IRepository<Industry>
+    {
+
+    }
+}

+ 15 - 0
MTWorkHR.Core/IRepositories/Lookups/IJobTitleRepository.cs

@@ -0,0 +1,15 @@
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.IRepositories.Base;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MTWorkHR.Core.IRepositories
+{
+    public interface IJobTitleRepository : IRepository<JobTitle>
+    {
+
+    }
+}

MTWorkHR.Core/IRepositories/User/ILeaveTypeRepository.cs → MTWorkHR.Core/IRepositories/Lookups/ILeaveTypeRepository.cs


MTWorkHR.Core/IRepositories/User/IOrderTypeRepository.cs → MTWorkHR.Core/IRepositories/Lookups/IOrderTypeRepository.cs


+ 3 - 0
MTWorkHR.Core/IUnitOfWork/IUnitOfWork.cs

@@ -22,6 +22,9 @@ namespace MTWorkHR.Core.UnitOfWork
         IOrderRequestRepository OrderRequest { get; }
         IOrderAllocationRepository OrderAllocation { get; }
         ILeaveTypeRepository LeaveType{ get; }
+        ICountryLookupRepository CountryLookup { get; }
+        IIndustryRepository Industry { get; }
+        IJobTitleRepository JobTitle { get; }
         Task<int> CompleteAsync();
 
         void BeginTran();

+ 4 - 0
MTWorkHR.Core/MTWorkHR.Core.csproj

@@ -6,4 +6,8 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
+  <ItemGroup>
+    <PackageReference Include="Countries.Net" Version="1.1.0" />
+  </ItemGroup>
+
 </Project>

+ 75 - 0
MTWorkHR.Infrastructure/Configurations/IndustryConfiguration.cs

@@ -0,0 +1,75 @@
+using Microsoft.AspNetCore.Identity;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Infrastructure.Entities;
+using MTWorkHR.Core.Entities.Base;
+using MTWorkHR.Core.Entities;
+
+namespace MTWorkHR.Infrastructure.Configurations
+{
+    public class IndustryConfiguration : IEntityTypeConfiguration<Industry>
+    {
+
+        public void Configure(EntityTypeBuilder<Industry> builder)
+        {
+
+            builder.HasData(
+                new Industry { NameEn = "Aerospace industry", NameAr = "صناعة الطيران والفضاء", Id = 1 },
+                new Industry { NameEn = "Agricultural industry", NameAr = "صناعة الزراعة", Id = 2 },
+                new Industry { NameEn = "Automotive industry", NameAr = "صناعة السيارات", Id = 3 },
+                new Industry { NameEn = "Basic metal", NameAr = "صناعة المعادن الأساسية", Id = 4 },
+                new Industry { NameEn = "Chemical industry", NameAr = "صناعة الكيماويات", Id = 5 },
+                new Industry { NameEn = "Computer industry", NameAr = "صناعة الحواسيب", Id = 6 },
+                new Industry { NameEn = "Construction industry", NameAr = "صناعة البناء", Id = 7 },
+                new Industry { NameEn = "Creative industry", NameAr = "صناعة الإبداعية", Id = 8 },
+                new Industry { NameEn = "Cultural industry", NameAr = "صناعة الثقافة", Id = 9 },
+                new Industry { NameEn = "Defense industry", NameAr = "صناعة الدفاع", Id = 10 },
+                new Industry { NameEn = "Education industry", NameAr = "صناعة التعليم", Id = 11 },
+                new Industry { NameEn = "Electric power", NameAr = "صناعة الطاقة الكهربائية", Id = 12 },
+                new Industry { NameEn = "Electronics industry", NameAr = "صناعة الإلكترونيات", Id = 13 },
+                new Industry { NameEn = "Energy industry", NameAr = "صناعة الطاقة", Id = 14 },
+                new Industry { NameEn = "Engineering industry", NameAr = "صناعة الهندسة", Id = 15 },
+                new Industry { NameEn = "Entertainment industry", NameAr = "صناعة الترفيه", Id = 16 },
+                new Industry { NameEn = "Farming industry", NameAr = "صناعة الزراعة", Id = 17 },
+                new Industry { NameEn = "Fashion industry", NameAr = "صناعة الموضة", Id = 18 },
+                new Industry { NameEn = "Film industry", NameAr = "صناعة السينما", Id = 19 },
+                new Industry { NameEn = "Financial services", NameAr = "صناعة الخدمات المالية", Id = 20 },
+                new Industry { NameEn = "Fishing industry", NameAr = "صناعة الصيد", Id = 21 },
+                new Industry { NameEn = "Food industry", NameAr = "صناعة الأغذية", Id = 22 },
+                new Industry { NameEn = "Forestry industry", NameAr = "صناعة الغابات", Id = 23 },
+                new Industry { NameEn = "Gambling industry", NameAr = "صناعة القمار", Id = 24 },
+                new Industry { NameEn = "Gas industry", NameAr = "صناعة الغاز", Id = 25 },
+                new Industry { NameEn = "Green industry", NameAr = "صناعة البيئة", Id = 26 },
+                new Industry { NameEn = "Health services industry", NameAr = "صناعة الخدمات الصحية", Id = 27 },
+                new Industry { NameEn = "Hospitality industry", NameAr = "صناعة الضيافة", Id = 28 },
+                new Industry { NameEn = "Hotels industry", NameAr = "صناعة الفنادق", Id = 29 },
+                new Industry { NameEn = "Industrial robot", NameAr = "صناعة الروبوتات الصناعية", Id = 30 },
+                new Industry { NameEn = "Information industry", NameAr = "صناعة المعلومات", Id = 31 },
+                new Industry { NameEn = "Information technology", NameAr = "صناعة تكنولوجيا المعلومات", Id = 32 },
+                new Industry { NameEn = "Infrastructure industry", NameAr = "صناعة البنية التحتية", Id = 33 },
+                new Industry { NameEn = "Insurance industry", NameAr = "صناعة التأمين", Id = 34 },
+                new Industry { NameEn = "Leisure industry", NameAr = "صناعة الترفيه", Id = 35 },
+                new Industry { NameEn = "Low technology", NameAr = "صناعة التكنولوجيا المنخفضة", Id = 36 },
+                new Industry { NameEn = "Manufacturing industry", NameAr = "صناعة التصنيع", Id = 37 },
+                new Industry { NameEn = "Meat industry", NameAr = "صناعة اللحوم", Id = 38},
+                new Industry { NameEn = "Media industry", NameAr = "صناعة الإعلام", Id = 39 },
+                new Industry { NameEn = "Merchandising industry", NameAr = "صناعة التجارة", Id = 40 },
+                new Industry { NameEn = "Mining industry", NameAr = "صناعة التعدين", Id = 41 },
+                new Industry { NameEn = "Music industry", NameAr = "صناعة الموسيقى", Id = 42 },
+                new Industry { NameEn = "News media", NameAr = "صناعة وسائل الإعلام", Id = 43 },
+                new Industry { NameEn = "Oil and gas industry", NameAr = "صناعة النفط والغاز", Id = 44 },
+                new Industry { NameEn = "Pharmaceutical industry", NameAr = "صناعة الأدوية", Id = 45 },
+                new Industry { NameEn = "Professional industry", NameAr = "صناعة المهنية", Id = 46 },
+                new Industry { NameEn = "Publishing industry", NameAr = "صناعة النشر", Id = 47 },
+                new Industry { NameEn = "Pulp and paper industry", NameAr = "صناعة الورق واللب", Id = 48 },
+                new Industry { NameEn = "Railway industry", NameAr = "صناعة السكك الحديدية", Id = 49 },
+                new Industry { NameEn = "Real estate", NameAr = "الانشاءات", Id = 50 }
+            );
+        }
+    }
+}

+ 53 - 0
MTWorkHR.Infrastructure/Configurations/JobTitleConfiguration.cs

@@ -0,0 +1,53 @@
+using Microsoft.AspNetCore.Identity;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using MTWorkHR.Infrastructure.Entities;
+using MTWorkHR.Core.Entities.Base;
+using MTWorkHR.Core.Entities;
+using Countries.NET.Database;
+using System.Runtime.ConstrainedExecution;
+
+namespace MTWorkHR.Infrastructure.Configurations
+{
+    public class JobTitleConfiguration : IEntityTypeConfiguration<JobTitle>
+    {
+
+        public void Configure(EntityTypeBuilder<JobTitle> builder)
+        {
+            
+            builder.HasData(
+                new JobTitle { NameEn = "Administrative Assistant", NameAr = "مساعد ادارى", Id = 1 },
+                new JobTitle { NameEn = "Receptionist", NameAr = "موظف استقبال", Id = 2 },
+                new JobTitle { NameEn = "Office Manager", NameAr = "مدير مكتب", Id = 3 },
+                new JobTitle { NameEn = "Auditing Clerk", NameAr = "مدقق محتوى", Id = 4 },
+                new JobTitle { NameEn = "Bookkeeper", NameAr = "محاسب", Id = 5 },
+                new JobTitle { NameEn = "Account Executive", NameAr = "مدير تنفيذى", Id = 6 },
+                new JobTitle { NameEn = "Branch Manager", NameAr = "مدير فرع", Id = 7 },
+                
+                new JobTitle { NameEn = "Business Manager", NameAr = "مدير", Id = 8 },
+                new JobTitle { NameEn = "Quality Control Coordinator", NameAr = "مسؤول الجودة", Id = 9 },
+                new JobTitle { NameEn = "Administrative Manager", NameAr = "مدير ادارى", Id = 10 },
+                new JobTitle { NameEn = "Chief Executive Officer", NameAr = "الرئيس التنفيذي", Id = 11 },
+                new JobTitle { NameEn = "Business Analyst", NameAr = "محلل", Id = 12 },
+                new JobTitle { NameEn = "Risk Manager", NameAr = "مدير المخاطر", Id = 13 },
+
+                new JobTitle { NameEn = "Human Resources", NameAr = "موارد بشرية", Id = 14 },
+                new JobTitle { NameEn = "Office Assistant", NameAr = "مساعد مكتب", Id = 15 },
+                new JobTitle { NameEn = "Secretary", NameAr = "السكرتارية", Id = 16 },
+                new JobTitle { NameEn = "Office Clerk", NameAr = "موظف مكتب", Id = 17 },
+                new JobTitle { NameEn = "Account Collector", NameAr = "جامع الحسابات", Id = 18 },
+                new JobTitle { NameEn = "Administrative Specialist", NameAr = "أخصائي إداري", Id = 19 },
+                new JobTitle { NameEn = "Executive Assistant", NameAr = "مساعد تنفيذي", Id = 20 },
+                new JobTitle { NameEn = "Program Administrator", NameAr = "مسؤل البرنامج", Id = 21 },
+                new JobTitle { NameEn = "Program Manager", NameAr = "مدير البرنامج", Id = 22 },
+                new JobTitle { NameEn = "Administrative Analyst", NameAr = "محلل إداري", Id = 23 },
+                new JobTitle { NameEn = "Data Entry", NameAr = "مدخل بيانات", Id = 24 }
+            );
+        }
+    }
+}

+ 8 - 0
MTWorkHR.Infrastructure/DBContext/HRDataContext.cs

@@ -41,6 +41,14 @@ namespace MTWorkHR.Infrastructure.DBContext
         public DbSet<LeaveType> LeaveTypes { get; set; }
         public DbSet<OrderAllocation> OrderAllocations { get; set; }
         public DbSet<OrderRequest> OrderRequests { get; set; }
+        //-------------------Lookups---------------------------
+        public DbSet<CountryLookup> CountryLookups { get; set; }
+        public DbSet<Qualification> Qualifications { get; set; }
+        public DbSet<University> Universities { get; set; }
+        public DbSet<Industry> Industries { get; set; }
+        public DbSet<JobTitle> JobTitles { get; set; }
+
+        
         //------------------------Logs------------------------
         public DbSet<UserLog> UserLogs { get; set; }
         public DbSet<AuthLog> AuthLogs { get; set; }

+ 18 - 3
MTWorkHR.Infrastructure/Entities/ApplicationUser.cs

@@ -1,4 +1,5 @@
 using Microsoft.AspNetCore.Identity;
+using MTWorkHR.Core.Entities;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations.Schema;
@@ -15,9 +16,23 @@ namespace MTWorkHR.Infrastructure.Entities
         public int UserType { get; set; }
         public string? FavoriteName { get; set; }
         public string PassportNumber { get; set; }
-        public int? QualificationId { get; set; }
-        public string? University { get; set; }
-        public string? JobTitle { get; set; }
+        public long? QualificationId { get; set; }
+
+        [ForeignKey("QualificationId")]
+        public Qualification? Qualification { get; set; }
+        public long? UniversityId { get; set; }
+        [ForeignKey("UniversityId")]
+        public University? University { get; set; }
+        public long? JobTitleId { get; set; }
+        [ForeignKey("JobTitleId")]
+        public JobTitle? JobTitle { get; set; }
+        public long? IndustryId { get; set; }
+        [ForeignKey("IndustryId")]
+        public Industry? Industry { get; set; }
+        public long? CountryId { get; set; }
+        [ForeignKey("CountryId")]
+
+        public CountryLookup? Country { get; set; }
 
         public string? ManagerId { get; set; }
         [Column(TypeName = "decimal(18,2)")]

+ 3 - 0
MTWorkHR.Infrastructure/InfrastructureServiceRegistration.cs

@@ -72,6 +72,9 @@ namespace MTWorkHR.Infrastructure
             services.AddScoped(typeof(IOrderRequestRepository), typeof(OrderRequestRepository));
             services.AddScoped(typeof(IOrderTypeRepository), typeof(OrderTypeRepository));
             services.AddScoped(typeof(ILeaveTypeRepository), typeof(LeaveTypeRepository));
+            services.AddScoped(typeof(ICountryLookupRepository), typeof(CountryLookupRepository));
+            services.AddScoped(typeof(IIndustryRepository), typeof(IndustryRepository));
+            services.AddScoped(typeof(IJobTitleRepository), typeof(JobTitleRepository));
 
 
 

文件差異過大導致無法顯示
+ 2382 - 0
MTWorkHR.Infrastructure/Migrations/20240403151641_country.Designer.cs


+ 192 - 0
MTWorkHR.Infrastructure/Migrations/20240403151641_country.cs

@@ -0,0 +1,192 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace MTWorkHR.Infrastructure.Migrations
+{
+    /// <inheritdoc />
+    public partial class country : Migration
+    {
+        /// <inheritdoc />
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "JobTitle",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropColumn(
+                name: "University",
+                table: "AspNetUsers");
+
+            migrationBuilder.AddColumn<int>(
+                name: "CountryId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true);
+
+            migrationBuilder.AddColumn<int>(
+                name: "IndustryId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true);
+
+            migrationBuilder.AddColumn<int>(
+                name: "JobTitleId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true);
+
+            migrationBuilder.AddColumn<int>(
+                name: "UniversityId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true);
+
+            migrationBuilder.CreateTable(
+                name: "CountryLookups",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    NameAr = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
+                    NameEn = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
+                    Code = table.Column<string>(type: "nvarchar(max)", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_CountryLookups", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Industries",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    NameAr = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
+                    NameEn = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Industries", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "JobTitles",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    NameAr = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
+                    NameEn = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_JobTitles", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Qualifications",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    NameAr = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
+                    NameEn = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Qualifications", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Universities",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("SqlServer:Identity", "1, 1"),
+                    NameAr = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
+                    NameEn = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Universities", x => x.Id);
+                });
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
+                columns: new[] { "CountryId", "IndustryId", "JobTitleId", "UniversityId" },
+                values: new object[] { null, null, null, null });
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
+                columns: new[] { "CountryId", "IndustryId", "JobTitleId", "UniversityId" },
+                values: new object[] { null, null, null, null });
+        }
+
+        /// <inheritdoc />
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropTable(
+                name: "CountryLookups");
+
+            migrationBuilder.DropTable(
+                name: "Industries");
+
+            migrationBuilder.DropTable(
+                name: "JobTitles");
+
+            migrationBuilder.DropTable(
+                name: "Qualifications");
+
+            migrationBuilder.DropTable(
+                name: "Universities");
+
+            migrationBuilder.DropColumn(
+                name: "CountryId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropColumn(
+                name: "IndustryId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropColumn(
+                name: "JobTitleId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropColumn(
+                name: "UniversityId",
+                table: "AspNetUsers");
+
+            migrationBuilder.AddColumn<string>(
+                name: "JobTitle",
+                table: "AspNetUsers",
+                type: "nvarchar(max)",
+                nullable: true);
+
+            migrationBuilder.AddColumn<string>(
+                name: "University",
+                table: "AspNetUsers",
+                type: "nvarchar(max)",
+                nullable: true);
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
+                columns: new[] { "JobTitle", "University" },
+                values: new object[] { null, null });
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
+                columns: new[] { "JobTitle", "University" },
+                values: new object[] { null, null });
+        }
+    }
+}

文件差異過大導致無法顯示
+ 2830 - 0
MTWorkHR.Infrastructure/Migrations/20240407125448_JobTitles.Designer.cs


+ 478 - 0
MTWorkHR.Infrastructure/Migrations/20240407125448_JobTitles.cs

@@ -0,0 +1,478 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
+
+namespace MTWorkHR.Infrastructure.Migrations
+{
+    /// <inheritdoc />
+    public partial class JobTitles : Migration
+    {
+        /// <inheritdoc />
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.InsertData(
+                table: "Industries",
+                columns: new[] { "Id", "NameAr", "NameEn" },
+                values: new object[,]
+                {
+                    { 1L, "صناعة الطيران والفضاء", "Aerospace industry" },
+                    { 2L, "صناعة الزراعة", "Agricultural industry" },
+                    { 3L, "صناعة السيارات", "Automotive industry" },
+                    { 4L, "صناعة المعادن الأساسية", "Basic metal" },
+                    { 5L, "صناعة الكيماويات", "Chemical industry" },
+                    { 6L, "صناعة الحواسيب", "Computer industry" },
+                    { 7L, "صناعة البناء", "Construction industry" },
+                    { 8L, "صناعة الإبداعية", "Creative industry" },
+                    { 9L, "صناعة الثقافة", "Cultural industry" },
+                    { 10L, "صناعة الدفاع", "Defense industry" },
+                    { 11L, "صناعة التعليم", "Education industry" },
+                    { 12L, "صناعة الطاقة الكهربائية", "Electric power" },
+                    { 13L, "صناعة الإلكترونيات", "Electronics industry" },
+                    { 14L, "صناعة الطاقة", "Energy industry" },
+                    { 15L, "صناعة الهندسة", "Engineering industry" },
+                    { 16L, "صناعة الترفيه", "Entertainment industry" },
+                    { 17L, "صناعة الزراعة", "Farming industry" },
+                    { 18L, "صناعة الموضة", "Fashion industry" },
+                    { 19L, "صناعة السينما", "Film industry" },
+                    { 20L, "صناعة الخدمات المالية", "Financial services" },
+                    { 21L, "صناعة الصيد", "Fishing industry" },
+                    { 22L, "صناعة الأغذية", "Food industry" },
+                    { 23L, "صناعة الغابات", "Forestry industry" },
+                    { 24L, "صناعة القمار", "Gambling industry" },
+                    { 25L, "صناعة الغاز", "Gas industry" },
+                    { 26L, "صناعة البيئة", "Green industry" },
+                    { 27L, "صناعة الخدمات الصحية", "Health services industry" },
+                    { 28L, "صناعة الضيافة", "Hospitality industry" },
+                    { 29L, "صناعة الفنادق", "Hotels industry" },
+                    { 30L, "صناعة الروبوتات الصناعية", "Industrial robot" },
+                    { 31L, "صناعة المعلومات", "Information industry" },
+                    { 32L, "صناعة تكنولوجيا المعلومات", "Information technology" },
+                    { 33L, "صناعة البنية التحتية", "Infrastructure industry" },
+                    { 34L, "صناعة التأمين", "Insurance industry" },
+                    { 35L, "صناعة الترفيه", "Leisure industry" },
+                    { 36L, "صناعة التكنولوجيا المنخفضة", "Low technology" },
+                    { 37L, "صناعة التصنيع", "Manufacturing industry" },
+                    { 38L, "صناعة اللحوم", "Meat industry" },
+                    { 39L, "صناعة الإعلام", "Media industry" },
+                    { 40L, "صناعة التجارة", "Merchandising industry" },
+                    { 41L, "صناعة التعدين", "Mining industry" },
+                    { 42L, "صناعة الموسيقى", "Music industry" },
+                    { 43L, "صناعة وسائل الإعلام", "News media" },
+                    { 44L, "صناعة النفط والغاز", "Oil and gas industry" },
+                    { 45L, "صناعة الأدوية", "Pharmaceutical industry" },
+                    { 46L, "صناعة المهنية", "Professional industry" },
+                    { 47L, "صناعة النشر", "Publishing industry" },
+                    { 48L, "صناعة الورق واللب", "Pulp and paper industry" },
+                    { 49L, "صناعة السكك الحديدية", "Railway industry" },
+                    { 50L, "الانشاءات", "Real estate" }
+                });
+
+            migrationBuilder.InsertData(
+                table: "JobTitles",
+                columns: new[] { "Id", "NameAr", "NameEn" },
+                values: new object[,]
+                {
+                    { 1L, "مساعد ادارى", "Administrative Assistant" },
+                    { 2L, "موظف استقبال", "Receptionist" },
+                    { 3L, "مدير مكتب", "Office Manager" },
+                    { 4L, "مدقق محتوى", "Auditing Clerk" },
+                    { 5L, "محاسب", "Bookkeeper" },
+                    { 6L, "مدير تنفيذى", "Account Executive" },
+                    { 7L, "مدير فرع", "Branch Manager" },
+                    { 8L, "مدير", "Business Manager" },
+                    { 9L, "مسؤول الجودة", "Quality Control Coordinator" },
+                    { 10L, "مدير ادارى", "Administrative Manager" },
+                    { 11L, "الرئيس التنفيذي", "Chief Executive Officer" },
+                    { 12L, "محلل", "Business Analyst" },
+                    { 13L, "مدير المخاطر", "Risk Manager" },
+                    { 14L, "موارد بشرية", "Human Resources" },
+                    { 15L, "مساعد مكتب", "Office Assistant" },
+                    { 16L, "السكرتارية", "Secretary" },
+                    { 17L, "موظف مكتب", "Office Clerk" },
+                    { 18L, "جامع الحسابات", "Account Collector" },
+                    { 19L, "أخصائي إداري", "Administrative Specialist" },
+                    { 20L, "مساعد تنفيذي", "Executive Assistant" },
+                    { 21L, "مسؤل البرنامج", "Program Administrator" },
+                    { 22L, "مدير البرنامج", "Program Manager" },
+                    { 23L, "محلل إداري", "Administrative Analyst" },
+                    { 24L, "مدخل بيانات", "Data Entry" }
+                });
+        }
+
+        /// <inheritdoc />
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 1L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 2L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 3L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 4L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 5L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 6L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 7L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 8L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 9L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 10L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 11L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 12L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 13L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 14L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 15L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 16L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 17L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 18L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 19L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 20L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 21L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 22L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 23L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 24L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 25L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 26L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 27L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 28L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 29L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 30L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 31L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 32L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 33L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 34L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 35L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 36L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 37L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 38L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 39L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 40L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 41L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 42L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 43L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 44L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 45L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 46L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 47L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 48L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 49L);
+
+            migrationBuilder.DeleteData(
+                table: "Industries",
+                keyColumn: "Id",
+                keyValue: 50L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 1L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 2L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 3L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 4L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 5L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 6L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 7L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 8L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 9L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 10L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 11L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 12L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 13L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 14L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 15L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 16L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 17L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 18L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 19L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 20L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 21L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 22L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 23L);
+
+            migrationBuilder.DeleteData(
+                table: "JobTitles",
+                keyColumn: "Id",
+                keyValue: 24L);
+        }
+    }
+}

文件差異過大導致無法顯示
+ 2870 - 0
MTWorkHR.Infrastructure/Migrations/20240414154330_altrUserRelations.Designer.cs


+ 236 - 0
MTWorkHR.Infrastructure/Migrations/20240414154330_altrUserRelations.cs

@@ -0,0 +1,236 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace MTWorkHR.Infrastructure.Migrations
+{
+    /// <inheritdoc />
+    public partial class altrUserRelations : Migration
+    {
+        /// <inheritdoc />
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AlterColumn<long>(
+                name: "UniversityId",
+                table: "AspNetUsers",
+                type: "bigint",
+                nullable: true,
+                oldClrType: typeof(int),
+                oldType: "int",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<long>(
+                name: "QualificationId",
+                table: "AspNetUsers",
+                type: "bigint",
+                nullable: true,
+                oldClrType: typeof(int),
+                oldType: "int",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<long>(
+                name: "JobTitleId",
+                table: "AspNetUsers",
+                type: "bigint",
+                nullable: true,
+                oldClrType: typeof(int),
+                oldType: "int",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<long>(
+                name: "IndustryId",
+                table: "AspNetUsers",
+                type: "bigint",
+                nullable: true,
+                oldClrType: typeof(int),
+                oldType: "int",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<long>(
+                name: "CountryId",
+                table: "AspNetUsers",
+                type: "bigint",
+                nullable: true,
+                oldClrType: typeof(int),
+                oldType: "int",
+                oldNullable: true);
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
+                columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
+                values: new object[] { null, null, null, 1L, null });
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
+                columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
+                values: new object[] { null, null, null, 1L, null });
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AspNetUsers_CountryId",
+                table: "AspNetUsers",
+                column: "CountryId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AspNetUsers_IndustryId",
+                table: "AspNetUsers",
+                column: "IndustryId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AspNetUsers_JobTitleId",
+                table: "AspNetUsers",
+                column: "JobTitleId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AspNetUsers_QualificationId",
+                table: "AspNetUsers",
+                column: "QualificationId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_AspNetUsers_UniversityId",
+                table: "AspNetUsers",
+                column: "UniversityId");
+
+            migrationBuilder.AddForeignKey(
+                name: "FK_AspNetUsers_CountryLookups_CountryId",
+                table: "AspNetUsers",
+                column: "CountryId",
+                principalTable: "CountryLookups",
+                principalColumn: "Id");
+
+            migrationBuilder.AddForeignKey(
+                name: "FK_AspNetUsers_Industries_IndustryId",
+                table: "AspNetUsers",
+                column: "IndustryId",
+                principalTable: "Industries",
+                principalColumn: "Id");
+
+            migrationBuilder.AddForeignKey(
+                name: "FK_AspNetUsers_JobTitles_JobTitleId",
+                table: "AspNetUsers",
+                column: "JobTitleId",
+                principalTable: "JobTitles",
+                principalColumn: "Id");
+
+            migrationBuilder.AddForeignKey(
+                name: "FK_AspNetUsers_Qualifications_QualificationId",
+                table: "AspNetUsers",
+                column: "QualificationId",
+                principalTable: "Qualifications",
+                principalColumn: "Id");
+
+            migrationBuilder.AddForeignKey(
+                name: "FK_AspNetUsers_Universities_UniversityId",
+                table: "AspNetUsers",
+                column: "UniversityId",
+                principalTable: "Universities",
+                principalColumn: "Id");
+        }
+
+        /// <inheritdoc />
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropForeignKey(
+                name: "FK_AspNetUsers_CountryLookups_CountryId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropForeignKey(
+                name: "FK_AspNetUsers_Industries_IndustryId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropForeignKey(
+                name: "FK_AspNetUsers_JobTitles_JobTitleId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropForeignKey(
+                name: "FK_AspNetUsers_Qualifications_QualificationId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropForeignKey(
+                name: "FK_AspNetUsers_Universities_UniversityId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropIndex(
+                name: "IX_AspNetUsers_CountryId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropIndex(
+                name: "IX_AspNetUsers_IndustryId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropIndex(
+                name: "IX_AspNetUsers_JobTitleId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropIndex(
+                name: "IX_AspNetUsers_QualificationId",
+                table: "AspNetUsers");
+
+            migrationBuilder.DropIndex(
+                name: "IX_AspNetUsers_UniversityId",
+                table: "AspNetUsers");
+
+            migrationBuilder.AlterColumn<int>(
+                name: "UniversityId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true,
+                oldClrType: typeof(long),
+                oldType: "bigint",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<int>(
+                name: "QualificationId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true,
+                oldClrType: typeof(long),
+                oldType: "bigint",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<int>(
+                name: "JobTitleId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true,
+                oldClrType: typeof(long),
+                oldType: "bigint",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<int>(
+                name: "IndustryId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true,
+                oldClrType: typeof(long),
+                oldType: "bigint",
+                oldNullable: true);
+
+            migrationBuilder.AlterColumn<int>(
+                name: "CountryId",
+                table: "AspNetUsers",
+                type: "int",
+                nullable: true,
+                oldClrType: typeof(long),
+                oldType: "bigint",
+                oldNullable: true);
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
+                columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
+                values: new object[] { null, null, null, 1, null });
+
+            migrationBuilder.UpdateData(
+                table: "AspNetUsers",
+                keyColumn: "Id",
+                keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
+                columns: new[] { "CountryId", "IndustryId", "JobTitleId", "QualificationId", "UniversityId" },
+                values: new object[] { null, null, null, 1, null });
+        }
+    }
+}

+ 626 - 8
MTWorkHR.Infrastructure/Migrations/HRDataContextModelSnapshot.cs

@@ -316,6 +316,34 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.ToTable("Companies");
                 });
 
+            modelBuilder.Entity("MTWorkHR.Core.Entities.CountryLookup", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint")
+                        .HasColumnOrder(0);
+
+                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
+
+                    b.Property<string>("Code")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("NameAr")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.Property<string>("NameEn")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("CountryLookups");
+                });
+
             modelBuilder.Entity("MTWorkHR.Core.Entities.FileLog", b =>
                 {
                     b.Property<long>("Id")
@@ -374,6 +402,502 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.ToTable("FileLogs");
                 });
 
+            modelBuilder.Entity("MTWorkHR.Core.Entities.Industry", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint")
+                        .HasColumnOrder(0);
+
+                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
+
+                    b.Property<string>("NameAr")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.Property<string>("NameEn")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Industries");
+
+                    b.HasData(
+                        new
+                        {
+                            Id = 1L,
+                            NameAr = "صناعة الطيران والفضاء",
+                            NameEn = "Aerospace industry"
+                        },
+                        new
+                        {
+                            Id = 2L,
+                            NameAr = "صناعة الزراعة",
+                            NameEn = "Agricultural industry"
+                        },
+                        new
+                        {
+                            Id = 3L,
+                            NameAr = "صناعة السيارات",
+                            NameEn = "Automotive industry"
+                        },
+                        new
+                        {
+                            Id = 4L,
+                            NameAr = "صناعة المعادن الأساسية",
+                            NameEn = "Basic metal"
+                        },
+                        new
+                        {
+                            Id = 5L,
+                            NameAr = "صناعة الكيماويات",
+                            NameEn = "Chemical industry"
+                        },
+                        new
+                        {
+                            Id = 6L,
+                            NameAr = "صناعة الحواسيب",
+                            NameEn = "Computer industry"
+                        },
+                        new
+                        {
+                            Id = 7L,
+                            NameAr = "صناعة البناء",
+                            NameEn = "Construction industry"
+                        },
+                        new
+                        {
+                            Id = 8L,
+                            NameAr = "صناعة الإبداعية",
+                            NameEn = "Creative industry"
+                        },
+                        new
+                        {
+                            Id = 9L,
+                            NameAr = "صناعة الثقافة",
+                            NameEn = "Cultural industry"
+                        },
+                        new
+                        {
+                            Id = 10L,
+                            NameAr = "صناعة الدفاع",
+                            NameEn = "Defense industry"
+                        },
+                        new
+                        {
+                            Id = 11L,
+                            NameAr = "صناعة التعليم",
+                            NameEn = "Education industry"
+                        },
+                        new
+                        {
+                            Id = 12L,
+                            NameAr = "صناعة الطاقة الكهربائية",
+                            NameEn = "Electric power"
+                        },
+                        new
+                        {
+                            Id = 13L,
+                            NameAr = "صناعة الإلكترونيات",
+                            NameEn = "Electronics industry"
+                        },
+                        new
+                        {
+                            Id = 14L,
+                            NameAr = "صناعة الطاقة",
+                            NameEn = "Energy industry"
+                        },
+                        new
+                        {
+                            Id = 15L,
+                            NameAr = "صناعة الهندسة",
+                            NameEn = "Engineering industry"
+                        },
+                        new
+                        {
+                            Id = 16L,
+                            NameAr = "صناعة الترفيه",
+                            NameEn = "Entertainment industry"
+                        },
+                        new
+                        {
+                            Id = 17L,
+                            NameAr = "صناعة الزراعة",
+                            NameEn = "Farming industry"
+                        },
+                        new
+                        {
+                            Id = 18L,
+                            NameAr = "صناعة الموضة",
+                            NameEn = "Fashion industry"
+                        },
+                        new
+                        {
+                            Id = 19L,
+                            NameAr = "صناعة السينما",
+                            NameEn = "Film industry"
+                        },
+                        new
+                        {
+                            Id = 20L,
+                            NameAr = "صناعة الخدمات المالية",
+                            NameEn = "Financial services"
+                        },
+                        new
+                        {
+                            Id = 21L,
+                            NameAr = "صناعة الصيد",
+                            NameEn = "Fishing industry"
+                        },
+                        new
+                        {
+                            Id = 22L,
+                            NameAr = "صناعة الأغذية",
+                            NameEn = "Food industry"
+                        },
+                        new
+                        {
+                            Id = 23L,
+                            NameAr = "صناعة الغابات",
+                            NameEn = "Forestry industry"
+                        },
+                        new
+                        {
+                            Id = 24L,
+                            NameAr = "صناعة القمار",
+                            NameEn = "Gambling industry"
+                        },
+                        new
+                        {
+                            Id = 25L,
+                            NameAr = "صناعة الغاز",
+                            NameEn = "Gas industry"
+                        },
+                        new
+                        {
+                            Id = 26L,
+                            NameAr = "صناعة البيئة",
+                            NameEn = "Green industry"
+                        },
+                        new
+                        {
+                            Id = 27L,
+                            NameAr = "صناعة الخدمات الصحية",
+                            NameEn = "Health services industry"
+                        },
+                        new
+                        {
+                            Id = 28L,
+                            NameAr = "صناعة الضيافة",
+                            NameEn = "Hospitality industry"
+                        },
+                        new
+                        {
+                            Id = 29L,
+                            NameAr = "صناعة الفنادق",
+                            NameEn = "Hotels industry"
+                        },
+                        new
+                        {
+                            Id = 30L,
+                            NameAr = "صناعة الروبوتات الصناعية",
+                            NameEn = "Industrial robot"
+                        },
+                        new
+                        {
+                            Id = 31L,
+                            NameAr = "صناعة المعلومات",
+                            NameEn = "Information industry"
+                        },
+                        new
+                        {
+                            Id = 32L,
+                            NameAr = "صناعة تكنولوجيا المعلومات",
+                            NameEn = "Information technology"
+                        },
+                        new
+                        {
+                            Id = 33L,
+                            NameAr = "صناعة البنية التحتية",
+                            NameEn = "Infrastructure industry"
+                        },
+                        new
+                        {
+                            Id = 34L,
+                            NameAr = "صناعة التأمين",
+                            NameEn = "Insurance industry"
+                        },
+                        new
+                        {
+                            Id = 35L,
+                            NameAr = "صناعة الترفيه",
+                            NameEn = "Leisure industry"
+                        },
+                        new
+                        {
+                            Id = 36L,
+                            NameAr = "صناعة التكنولوجيا المنخفضة",
+                            NameEn = "Low technology"
+                        },
+                        new
+                        {
+                            Id = 37L,
+                            NameAr = "صناعة التصنيع",
+                            NameEn = "Manufacturing industry"
+                        },
+                        new
+                        {
+                            Id = 38L,
+                            NameAr = "صناعة اللحوم",
+                            NameEn = "Meat industry"
+                        },
+                        new
+                        {
+                            Id = 39L,
+                            NameAr = "صناعة الإعلام",
+                            NameEn = "Media industry"
+                        },
+                        new
+                        {
+                            Id = 40L,
+                            NameAr = "صناعة التجارة",
+                            NameEn = "Merchandising industry"
+                        },
+                        new
+                        {
+                            Id = 41L,
+                            NameAr = "صناعة التعدين",
+                            NameEn = "Mining industry"
+                        },
+                        new
+                        {
+                            Id = 42L,
+                            NameAr = "صناعة الموسيقى",
+                            NameEn = "Music industry"
+                        },
+                        new
+                        {
+                            Id = 43L,
+                            NameAr = "صناعة وسائل الإعلام",
+                            NameEn = "News media"
+                        },
+                        new
+                        {
+                            Id = 44L,
+                            NameAr = "صناعة النفط والغاز",
+                            NameEn = "Oil and gas industry"
+                        },
+                        new
+                        {
+                            Id = 45L,
+                            NameAr = "صناعة الأدوية",
+                            NameEn = "Pharmaceutical industry"
+                        },
+                        new
+                        {
+                            Id = 46L,
+                            NameAr = "صناعة المهنية",
+                            NameEn = "Professional industry"
+                        },
+                        new
+                        {
+                            Id = 47L,
+                            NameAr = "صناعة النشر",
+                            NameEn = "Publishing industry"
+                        },
+                        new
+                        {
+                            Id = 48L,
+                            NameAr = "صناعة الورق واللب",
+                            NameEn = "Pulp and paper industry"
+                        },
+                        new
+                        {
+                            Id = 49L,
+                            NameAr = "صناعة السكك الحديدية",
+                            NameEn = "Railway industry"
+                        },
+                        new
+                        {
+                            Id = 50L,
+                            NameAr = "الانشاءات",
+                            NameEn = "Real estate"
+                        });
+                });
+
+            modelBuilder.Entity("MTWorkHR.Core.Entities.JobTitle", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint")
+                        .HasColumnOrder(0);
+
+                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
+
+                    b.Property<string>("NameAr")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.Property<string>("NameEn")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("JobTitles");
+
+                    b.HasData(
+                        new
+                        {
+                            Id = 1L,
+                            NameAr = "مساعد ادارى",
+                            NameEn = "Administrative Assistant"
+                        },
+                        new
+                        {
+                            Id = 2L,
+                            NameAr = "موظف استقبال",
+                            NameEn = "Receptionist"
+                        },
+                        new
+                        {
+                            Id = 3L,
+                            NameAr = "مدير مكتب",
+                            NameEn = "Office Manager"
+                        },
+                        new
+                        {
+                            Id = 4L,
+                            NameAr = "مدقق محتوى",
+                            NameEn = "Auditing Clerk"
+                        },
+                        new
+                        {
+                            Id = 5L,
+                            NameAr = "محاسب",
+                            NameEn = "Bookkeeper"
+                        },
+                        new
+                        {
+                            Id = 6L,
+                            NameAr = "مدير تنفيذى",
+                            NameEn = "Account Executive"
+                        },
+                        new
+                        {
+                            Id = 7L,
+                            NameAr = "مدير فرع",
+                            NameEn = "Branch Manager"
+                        },
+                        new
+                        {
+                            Id = 8L,
+                            NameAr = "مدير",
+                            NameEn = "Business Manager"
+                        },
+                        new
+                        {
+                            Id = 9L,
+                            NameAr = "مسؤول الجودة",
+                            NameEn = "Quality Control Coordinator"
+                        },
+                        new
+                        {
+                            Id = 10L,
+                            NameAr = "مدير ادارى",
+                            NameEn = "Administrative Manager"
+                        },
+                        new
+                        {
+                            Id = 11L,
+                            NameAr = "الرئيس التنفيذي",
+                            NameEn = "Chief Executive Officer"
+                        },
+                        new
+                        {
+                            Id = 12L,
+                            NameAr = "محلل",
+                            NameEn = "Business Analyst"
+                        },
+                        new
+                        {
+                            Id = 13L,
+                            NameAr = "مدير المخاطر",
+                            NameEn = "Risk Manager"
+                        },
+                        new
+                        {
+                            Id = 14L,
+                            NameAr = "موارد بشرية",
+                            NameEn = "Human Resources"
+                        },
+                        new
+                        {
+                            Id = 15L,
+                            NameAr = "مساعد مكتب",
+                            NameEn = "Office Assistant"
+                        },
+                        new
+                        {
+                            Id = 16L,
+                            NameAr = "السكرتارية",
+                            NameEn = "Secretary"
+                        },
+                        new
+                        {
+                            Id = 17L,
+                            NameAr = "موظف مكتب",
+                            NameEn = "Office Clerk"
+                        },
+                        new
+                        {
+                            Id = 18L,
+                            NameAr = "جامع الحسابات",
+                            NameEn = "Account Collector"
+                        },
+                        new
+                        {
+                            Id = 19L,
+                            NameAr = "أخصائي إداري",
+                            NameEn = "Administrative Specialist"
+                        },
+                        new
+                        {
+                            Id = 20L,
+                            NameAr = "مساعد تنفيذي",
+                            NameEn = "Executive Assistant"
+                        },
+                        new
+                        {
+                            Id = 21L,
+                            NameAr = "مسؤل البرنامج",
+                            NameEn = "Program Administrator"
+                        },
+                        new
+                        {
+                            Id = 22L,
+                            NameAr = "مدير البرنامج",
+                            NameEn = "Program Manager"
+                        },
+                        new
+                        {
+                            Id = 23L,
+                            NameAr = "محلل إداري",
+                            NameEn = "Administrative Analyst"
+                        },
+                        new
+                        {
+                            Id = 24L,
+                            NameAr = "مدخل بيانات",
+                            NameEn = "Data Entry"
+                        });
+                });
+
             modelBuilder.Entity("MTWorkHR.Core.Entities.LeaveType", b =>
                 {
                     b.Property<long>("Id")
@@ -796,6 +1320,30 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.ToTable("Projects");
                 });
 
+            modelBuilder.Entity("MTWorkHR.Core.Entities.Qualification", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint")
+                        .HasColumnOrder(0);
+
+                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
+
+                    b.Property<string>("NameAr")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.Property<string>("NameEn")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Qualifications");
+                });
+
             modelBuilder.Entity("MTWorkHR.Core.Entities.RoleLog", b =>
                 {
                     b.Property<long>("Id")
@@ -1065,6 +1613,30 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.ToTable("TeamUser");
                 });
 
+            modelBuilder.Entity("MTWorkHR.Core.Entities.University", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint")
+                        .HasColumnOrder(0);
+
+                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
+
+                    b.Property<string>("NameAr")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.Property<string>("NameEn")
+                        .IsRequired()
+                        .HasMaxLength(250)
+                        .HasColumnType("nvarchar(250)");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Universities");
+                });
+
             modelBuilder.Entity("MTWorkHR.Core.Entities.User.OrderRequest", b =>
                 {
                     b.Property<long>("Id")
@@ -1564,6 +2136,9 @@ namespace MTWorkHR.Infrastructure.Migrations
                         .IsConcurrencyToken()
                         .HasColumnType("nvarchar(max)");
 
+                    b.Property<long?>("CountryId")
+                        .HasColumnType("bigint");
+
                     b.Property<string>("CreateUser")
                         .HasColumnType("nvarchar(max)");
 
@@ -1587,14 +2162,17 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.Property<decimal?>("IncomeTaxValue")
                         .HasColumnType("decimal(18,2)");
 
+                    b.Property<long?>("IndustryId")
+                        .HasColumnType("bigint");
+
                     b.Property<bool>("IsDeleted")
                         .HasColumnType("bit");
 
                     b.Property<bool>("IsStopped")
                         .HasColumnType("bit");
 
-                    b.Property<string>("JobTitle")
-                        .HasColumnType("nvarchar(max)");
+                    b.Property<long?>("JobTitleId")
+                        .HasColumnType("bigint");
 
                     b.Property<string>("LastName")
                         .IsRequired()
@@ -1633,8 +2211,8 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.Property<bool>("PhoneNumberConfirmed")
                         .HasColumnType("bit");
 
-                    b.Property<int?>("QualificationId")
-                        .HasColumnType("int");
+                    b.Property<long?>("QualificationId")
+                        .HasColumnType("bigint");
 
                     b.Property<string>("SecurityStamp")
                         .HasColumnType("nvarchar(max)");
@@ -1645,8 +2223,8 @@ namespace MTWorkHR.Infrastructure.Migrations
                     b.Property<bool>("TwoFactorEnabled")
                         .HasColumnType("bit");
 
-                    b.Property<string>("University")
-                        .HasColumnType("nvarchar(max)");
+                    b.Property<long?>("UniversityId")
+                        .HasColumnType("bigint");
 
                     b.Property<string>("UpdateUser")
                         .HasColumnType("nvarchar(max)");
@@ -1660,6 +2238,12 @@ namespace MTWorkHR.Infrastructure.Migrations
 
                     b.HasKey("Id");
 
+                    b.HasIndex("CountryId");
+
+                    b.HasIndex("IndustryId");
+
+                    b.HasIndex("JobTitleId");
+
                     b.HasIndex("ManagerId");
 
                     b.HasIndex("NormalizedEmail")
@@ -1670,6 +2254,10 @@ namespace MTWorkHR.Infrastructure.Migrations
                         .HasDatabaseName("UserNameIndex")
                         .HasFilter("[NormalizedUserName] IS NOT NULL");
 
+                    b.HasIndex("QualificationId");
+
+                    b.HasIndex("UniversityId");
+
                     b.ToTable("AspNetUsers", (string)null);
 
                     b.HasData(
@@ -1692,7 +2280,7 @@ namespace MTWorkHR.Infrastructure.Migrations
                             PasswordHash = "AQAAAAIAAYagAAAAEPg+ASbciPFxtyxQq8Wx5ilBUQ0RbAoITXXkOQm1PzC5BzySX0sn/wUmOjBKPDGV9w==",
                             PhoneNumber = "1234567890",
                             PhoneNumberConfirmed = true,
-                            QualificationId = 1,
+                            QualificationId = 1L,
                             SecurityStamp = "49bb16c3-4704-4c60-908d-dc8506950acc",
                             TaxNumber = 111m,
                             TwoFactorEnabled = false,
@@ -1718,7 +2306,7 @@ namespace MTWorkHR.Infrastructure.Migrations
                             PasswordHash = "AQAAAAIAAYagAAAAEI3QJkcZjCH4Y8Db4rEgL8Mmll5oCvYcWiXZjQSN9bGW4SMcjHe3ZPMnkN/l9DmJeQ==",
                             PhoneNumber = "1234567890",
                             PhoneNumberConfirmed = true,
-                            QualificationId = 1,
+                            QualificationId = 1L,
                             SecurityStamp = "62549056-1b9d-46d4-84f8-adea3e4d8b68",
                             TaxNumber = 222m,
                             TwoFactorEnabled = false,
@@ -2107,11 +2695,41 @@ namespace MTWorkHR.Infrastructure.Migrations
 
             modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.ApplicationUser", b =>
                 {
+                    b.HasOne("MTWorkHR.Core.Entities.CountryLookup", "Country")
+                        .WithMany()
+                        .HasForeignKey("CountryId");
+
+                    b.HasOne("MTWorkHR.Core.Entities.Industry", "Industry")
+                        .WithMany()
+                        .HasForeignKey("IndustryId");
+
+                    b.HasOne("MTWorkHR.Core.Entities.JobTitle", "JobTitle")
+                        .WithMany()
+                        .HasForeignKey("JobTitleId");
+
                     b.HasOne("MTWorkHR.Infrastructure.Entities.ApplicationUser", "Manager")
                         .WithMany()
                         .HasForeignKey("ManagerId");
 
+                    b.HasOne("MTWorkHR.Core.Entities.Qualification", "Qualification")
+                        .WithMany()
+                        .HasForeignKey("QualificationId");
+
+                    b.HasOne("MTWorkHR.Core.Entities.University", "University")
+                        .WithMany()
+                        .HasForeignKey("UniversityId");
+
+                    b.Navigation("Country");
+
+                    b.Navigation("Industry");
+
+                    b.Navigation("JobTitle");
+
                     b.Navigation("Manager");
+
+                    b.Navigation("Qualification");
+
+                    b.Navigation("University");
                 });
 
             modelBuilder.Entity("MTWorkHR.Infrastructure.Entities.RolePermission", b =>

+ 19 - 0
MTWorkHR.Infrastructure/Repositories/Lookups/CountryLookupRepository.cs

@@ -0,0 +1,19 @@
+using Microsoft.EntityFrameworkCore;
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.IDto;
+using MTWorkHR.Core.IRepositories;
+using MTWorkHR.Infrastructure.Entities;
+using MTWorkHR.Infrastructure.DBContext;
+
+namespace MTWorkHR.Infrastructure.Repositories
+{
+    public class CountryLookupRepository : Repository<CountryLookup>, ICountryLookupRepository
+    {
+        private readonly DbSet<CountryLookup> dbSet;
+        public CountryLookupRepository(HRDataContext context) : base(context)
+        {
+            dbSet = context.Set<CountryLookup>();
+        }
+        
+    }
+}

+ 19 - 0
MTWorkHR.Infrastructure/Repositories/Lookups/IndustryRepository.cs

@@ -0,0 +1,19 @@
+using Microsoft.EntityFrameworkCore;
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.IDto;
+using MTWorkHR.Core.IRepositories;
+using MTWorkHR.Infrastructure.Entities;
+using MTWorkHR.Infrastructure.DBContext;
+
+namespace MTWorkHR.Infrastructure.Repositories
+{
+    public class IndustryRepository : Repository<Industry>, IIndustryRepository
+    {
+        private readonly DbSet<Industry> dbSet;
+        public IndustryRepository(HRDataContext context) : base(context)
+        {
+            dbSet = context.Set<Industry>();
+        }
+
+    }
+}

+ 19 - 0
MTWorkHR.Infrastructure/Repositories/Lookups/JobTitleRepository.cs

@@ -0,0 +1,19 @@
+using Microsoft.EntityFrameworkCore;
+using MTWorkHR.Core.Entities;
+using MTWorkHR.Core.IDto;
+using MTWorkHR.Core.IRepositories;
+using MTWorkHR.Infrastructure.Entities;
+using MTWorkHR.Infrastructure.DBContext;
+
+namespace MTWorkHR.Infrastructure.Repositories
+{
+    public class JobTitleRepository : Repository<JobTitle>, IJobTitleRepository
+    {
+        private readonly DbSet<JobTitle> dbSet;
+        public JobTitleRepository(HRDataContext context) : base(context)
+        {
+            dbSet = context.Set<JobTitle>();
+        }
+
+    }
+}

MTWorkHR.Infrastructure/Repositories/User/LeaveTypeRepository.cs → MTWorkHR.Infrastructure/Repositories/Lookups/LeaveTypeRepository.cs


+ 9 - 0
MTWorkHR.Infrastructure/UnitOfWork/UnitOfWork.cs

@@ -28,6 +28,9 @@ namespace MTWorkHR.Infrastructure.UnitOfWorks
         public ILeaveTypeRepository LeaveType { get; }
         public IOrderAllocationRepository OrderAllocation { get; }
         public IOrderRequestRepository OrderRequest { get; }
+        public ICountryLookupRepository CountryLookup { get; }
+        public IIndustryRepository Industry { get; }
+        public IJobTitleRepository JobTitle { get; }
 
         public UnitOfWork(HRDataContext _context
             , IPermissionRepository permission
@@ -44,6 +47,9 @@ namespace MTWorkHR.Infrastructure.UnitOfWorks
             , IOrderAllocationRepository orderAllocation
             , IOrderTypeRepository orderType
             , ILeaveTypeRepository leaveType
+            , ICountryLookupRepository countryLookup
+            , IIndustryRepository industry
+            , IJobTitleRepository jobTitle
 
             )
         {
@@ -62,6 +68,9 @@ namespace MTWorkHR.Infrastructure.UnitOfWorks
             this.OrderRequest = orderRequest;
             this.OrderAllocation = orderAllocation;
             this.LeaveType = leaveType;
+            this.CountryLookup = countryLookup;
+            this.Industry = industry;
+            this.JobTitle = jobTitle;
         }
 
         public async Task<int> CompleteAsync()