- Added `moderator` role to `User` type for improved role assignment flexibility. - Introduced `updateAdmin` method in user and content services to handle partial admin-specific updates. - Enhanced `Content` type with `categoryId` and `iconUrl` to support richer categorization.
26 lines
426 B
TypeScript
26 lines
426 B
TypeScript
import { IsOptional, IsString, MaxLength } from "class-validator";
|
|
|
|
export class UpdateUserDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(32)
|
|
displayName?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(255)
|
|
bio?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
avatarUrl?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
status?: "active" | "verification" | "suspended" | "pending" | "deleted";
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
role?: string;
|
|
}
|