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:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user