Productionize EventSphere platform
This commit is contained in:
18
apps/api/src/modules/roles/dto.ts
Normal file
18
apps/api/src/modules/roles/dto.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ArrayNotEmpty, IsArray, IsNotEmpty, IsOptional, IsString } from "class-validator";
|
||||
|
||||
export class CreateRoleDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ArrayNotEmpty()
|
||||
permissionKeys?: string[];
|
||||
}
|
||||
|
||||
export class SetRolePermissionsDto {
|
||||
@IsArray()
|
||||
permissionKeys!: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user