From 808fe0a18e02de308e91eae7d4bd7bea99b43d22 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Thu, 3 Nov 2022 01:59:50 +0100 Subject: [PATCH] introduce a user exchange message --- src/auth/dto/user.dto.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/auth/dto/user.dto.ts diff --git a/src/auth/dto/user.dto.ts b/src/auth/dto/user.dto.ts new file mode 100644 index 0000000..cd238e3 --- /dev/null +++ b/src/auth/dto/user.dto.ts @@ -0,0 +1,32 @@ +import { IsNotEmpty } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class UserDto { + @IsNotEmpty() + @ApiProperty({ + description: 'The vatsim ID', + example: '10000001', + }) + vatsimId: string; + + @IsNotEmpty() + @ApiProperty({ + description: 'The shared full name or "Private"', + example: 'Web One', + }) + fullName: string; + + @IsNotEmpty() + @ApiProperty({ + description: 'Indicates if the user has administrator access', + example: false, + }) + administrator: boolean; + + @IsNotEmpty() + @ApiProperty({ + description: 'All airport ICAOs that can be configured', + example: '["EDDB", "EDDF"]', + }) + airportConfigurationAccess: string[]; +}