RolePermission.cs 821 B

123456789101112131415161718192021222324252627
  1. using MTWorkHR.Core.Entities;
  2. using MTWorkHR.Core.Entities.Base;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace MTWorkHR.Infrastructure.Entities
  10. {
  11. // This partial class to add the navigation prop ApplicationRole
  12. // because ApplicationRole is defined in Infrastructure.Identity and cannot be used in Core layer
  13. public class RolePermission : Entity
  14. {
  15. public string RoleId { get; set; }
  16. [ForeignKey("RoleId")]
  17. public ApplicationRole Role { get; set; }
  18. public long PermissionId { get; set; }
  19. [ForeignKey("PermissionId")]
  20. public Permission Permission { get; set; }
  21. public string PermissionName { get; set; }
  22. }
  23. }