Created a new system for the Groups that will persist after having entities

This commit is contained in:
Tiago Ribeiro
2024-09-25 16:18:43 +01:00
parent 8c392f8b49
commit dd94228672
18 changed files with 823 additions and 136 deletions

16
src/interfaces/entity.ts Normal file
View File

@@ -0,0 +1,16 @@
export interface Entity {
id: string;
label: string;
}
export interface Roles {
id: string;
permissions: string[];
label: string;
}
export interface EntityWithPermissions extends Entity {
roles: Roles[];
}
export type WithEntity<T> = T extends {entities: string[]} ? T & {entities: Entity[]} : T;