21 lines
785 B
C#
21 lines
785 B
C#
using Fitness_core_BE.Models;
|
|
|
|
namespace Fitness_core_BE.Interfaces
|
|
{
|
|
public interface IGymRoleRepository
|
|
{
|
|
Task<List<GymRole>> GetRolesByClientId(Guid clientId);
|
|
Task<GymRole?> GetRoleById(Guid gymRoleId);
|
|
Task<GymRole> CreateRole(GymRole role);
|
|
Task<GymRole> UpdateRole(GymRole role);
|
|
Task DeleteRole(GymRole role);
|
|
Task ReplacePermissions(Guid gymRoleId, IEnumerable<string> navKeys);
|
|
Task<List<string>> GetPermissionKeys(Guid gymRoleId);
|
|
|
|
// Returns false if the staff member doesn't exist or doesn't belong to clientId (tenant isolation),
|
|
// or if gymRoleId is supplied but doesn't belong to clientId either.
|
|
Task<bool> AssignStaffRole(Guid staffId, Guid clientId, Guid? gymRoleId);
|
|
|
|
}
|
|
}
|