using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FJPSite.Data.Authorisation;

public class FeatureAction
{
    [Key]
    public int Id { get; set; }

    [Required, ForeignKey(nameof(Feature))]
    public int FeatureId { get; set; }

    public Feature Feature { get; set; }

    [Required, ForeignKey(nameof(Action))]
    public int ActionId { get; set; }

    public PermissionAction Action { get; set; }

    public ICollection<RolePermission> RolePermissions { get; set; } = new List<RolePermission>();
}
