49 lines
968 B
TypeScript
49 lines
968 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { Roles } from '@prisma/client';
|
|
|
|
export class UserDto {
|
|
@ApiProperty({
|
|
example: 'd67f05be-6dd1-464f-b5f7-31b325e21b4a',
|
|
description: 'User`s unique UUID (primary key)',
|
|
})
|
|
id: string;
|
|
|
|
@ApiProperty({
|
|
example: 'Aragorn',
|
|
description: 'user`s first name',
|
|
})
|
|
first_name: string;
|
|
|
|
@ApiProperty({
|
|
example: 'Elessar',
|
|
description: 'user`s last name',
|
|
})
|
|
last_name: string;
|
|
|
|
@ApiProperty({
|
|
example: 'king@arnor-gondor.gov',
|
|
description: 'Unique email address',
|
|
})
|
|
email: string;
|
|
|
|
@ApiProperty({
|
|
example: 5141234567,
|
|
description: 'Unique phone number',
|
|
})
|
|
phone_number: string;
|
|
|
|
@ApiProperty({
|
|
example: 'Minas Tirith, Gondor',
|
|
description: 'residence address (optional)',
|
|
required: false,
|
|
})
|
|
residence?: string;
|
|
|
|
@ApiProperty({
|
|
example: 'EMPLOYEE',
|
|
enum: Roles,
|
|
description: 'User`s given role',
|
|
})
|
|
role: Roles;
|
|
}
|