@upv/ushi-shared
Version:
Shared DTOs, types, and utilities for the USHI platform (LMS, Trials, Social, Wallet).
38 lines (37 loc) • 961 B
TypeScript
import { IBaseDtoInput, IBaseDtoOutput } from './base';
import { RoleDomain, PersonRole } from '../core';
/**
* IRoleDto
*
* Represents the raw input structure for a Role entity,
* typically used when creating or updating roles in the system.
*/
export interface IRoleDto extends IBaseDtoInput {
/**
* The role key (e.g., 'admin', 'student'), chosen from the PersonRole enum.
*/
key: PersonRole;
/**
* Person-facing label (e.g., 'Administrator', 'Student')
*/
label: string;
/**
* Domain where this role applies (e.g., LMS, Trial)
*/
domain: RoleDomain;
/**
* Optional description of the role’s permissions or purpose
*/
description?: string;
}
/**
* IRole
*
* Represents the fully serialized Role entity returned by the system.
*/
export interface IRole extends IBaseDtoOutput {
key: PersonRole;
label: string;
domain: RoleDomain;
description: string | null;
}