24 lines
835 B
C#
24 lines
835 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Fitness_core_BE.Models
|
|
{
|
|
// A gym owner's custom, per-tenant staff role. Blank slate — creating a role grants
|
|
// zero permissions; the owner assigns them explicitly via GymRolePermission afterward.
|
|
public class GymRole
|
|
{
|
|
[Key]
|
|
public Guid GymRoleId { get; set; }
|
|
|
|
public Guid FKClientId { get; set; }
|
|
[ForeignKey("FKClientId")]
|
|
public virtual Client Client { get; set; }
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
public bool IsActive { get; set; } = true;
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
public virtual ICollection<GymRolePermission> Permissions { get; set; } = new List<GymRolePermission>();
|
|
}
|
|
}
|