using AyCode.Models.Enums;

namespace TIAM.Models.Dtos.Products
{
    public class AssignedPermissionModel
    {
        public Guid ContextId { get; set; }
        public Guid SubjectId { get; set; } //user or group id
        public PermissionContextMappingSubjectType SubjectType { get; set; } //user or group
        public string Name { get; set; } //user email or group name
        public int PermissionsValue { get; set; }

        public AssignedPermissionModel(Guid contextId, Guid subjectId, PermissionContextMappingSubjectType subjectType, string name, int permissionsValue)
        {
            ContextId = contextId;
            SubjectId = subjectId;
            SubjectType = subjectType;
            Name = name;
            PermissionsValue = permissionsValue;
        }

    }
}
