21 lines
842 B
C#
21 lines
842 B
C#
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; }
|
|
}
|
|
}
|