Enhance role management by adding 'title' property to CreateRoleDto, UpdateRoleDto, and Role entity; update RoleService to handle title in create and update operations; modify DatabaseSeeder to include titles for predefined roles.

This commit is contained in:
2025-11-18 10:24:45 +03:30
parent 7bc94b4126
commit 6f22dddcec
7 changed files with 342 additions and 8 deletions
+5
View File
@@ -7,6 +7,11 @@ export class CreateRoleDto {
@IsString()
name!: string;
@ApiProperty({ description: 'Role title' })
@IsNotEmpty()
@IsString()
title!: string;
@ApiProperty({ description: 'Restaurant id (optional)', required: false })
@IsOptional()
@IsString()
+5
View File
@@ -7,6 +7,11 @@ export class UpdateRoleDto {
@IsString()
name?: string;
@ApiProperty({ description: 'Role title', required: false })
@IsOptional()
@IsString()
title?: string;
@ApiProperty({ description: 'List of permission IDs', isArray: true, required: false })
@IsOptional()
@IsArray()