first commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Fitness_core_BE.Models
|
||||
{
|
||||
// Join row: a GymRole is granted access to one NavItem/permission key.
|
||||
// Composite key (FKGymRoleId, NavItemKey) is configured in TenantDbContext.OnModelCreating.
|
||||
public class GymRolePermission
|
||||
{
|
||||
public Guid FKGymRoleId { get; set; }
|
||||
[ForeignKey("FKGymRoleId")]
|
||||
public virtual GymRole GymRole { get; set; }
|
||||
|
||||
// NavItem is central-bucket (global nav catalog); this FK is a plain scalar in
|
||||
// TenantDbContext (see Ignore config there) -- resolve the label from NavItemKey
|
||||
// against CentralDbContext.NavItems when actually needed.
|
||||
public string NavItemKey { get; set; } = string.Empty;
|
||||
[ForeignKey("NavItemKey")]
|
||||
public virtual NavItem NavItem { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user