Files
grow-api/src/auth/dto/auth-tokens-response.dto.ts
T
2026-07-02 20:21:12 +03:30

31 lines
553 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { UserRole } from '../../users/enums/user-role.enum';
class AuthUserResponseDto {
@ApiProperty({ format: 'uuid' })
id: string;
@ApiProperty()
firstName: string;
@ApiProperty()
lastName: string;
@ApiProperty()
mobile: string;
@ApiProperty({ enum: UserRole })
role: UserRole;
}
export class AuthTokensResponseDto {
@ApiProperty()
accessToken: string;
@ApiProperty()
refreshToken: string;
@ApiProperty({ type: AuthUserResponseDto })
user: AuthUserResponseDto;
}