RolePermission.cs 783 B

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