Browse Source

introduce a user exchange message

Sven Czarnian 2 years ago
parent
commit
808fe0a18e
1 changed files with 32 additions and 0 deletions
  1. 32 0
      src/auth/dto/user.dto.ts

+ 32 - 0
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[];
+}