gradido/backend/src/graphql/arg/SetUserRoleArgs.ts
einhornimmond 07a80b2df7 linting
2025-12-04 13:01:01 +01:00

16 lines
377 B
TypeScript

import { RoleNames } from '@enum/RoleNames'
import { IsEnum, IsPositive } from 'class-validator'
import { ArgsType, Field, InputType, Int } from 'type-graphql'
@InputType()
@ArgsType()
export class SetUserRoleArgs {
@Field(() => Int)
@IsPositive()
userId: number
@Field(() => RoleNames, { nullable: true })
@IsEnum(RoleNames)
role: RoleNames | null | undefined
}