2022-07-09 04:26:50 +02:00
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
2022-08-16 02:11:08 +02:00
|
|
|
import { Transform } from 'class-transformer';
|
2022-11-04 00:55:13 +01:00
|
|
|
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
|
2022-02-03 17:06:44 +01:00
|
|
|
|
|
|
|
export class SignUpDto {
|
2023-06-14 23:26:17 +02:00
|
|
|
@IsEmail({ require_tld: false })
|
2022-07-09 04:26:50 +02:00
|
|
|
@ApiProperty({ example: 'testuser@email.com' })
|
2022-11-04 00:55:13 +01:00
|
|
|
@Transform(({ value }) => value.toLowerCase())
|
2022-06-25 19:53:06 +02:00
|
|
|
email!: string;
|
2022-02-03 17:06:44 +01:00
|
|
|
|
2022-11-04 00:55:13 +01:00
|
|
|
@IsString()
|
2022-02-03 17:06:44 +01:00
|
|
|
@IsNotEmpty()
|
2022-07-09 04:26:50 +02:00
|
|
|
@ApiProperty({ example: 'password' })
|
2022-06-25 19:53:06 +02:00
|
|
|
password!: string;
|
2022-05-21 09:23:55 +02:00
|
|
|
|
2022-11-04 00:55:13 +01:00
|
|
|
@IsString()
|
2022-05-21 09:23:55 +02:00
|
|
|
@IsNotEmpty()
|
2022-07-09 04:26:50 +02:00
|
|
|
@ApiProperty({ example: 'Admin' })
|
2022-06-25 19:53:06 +02:00
|
|
|
firstName!: string;
|
2022-05-21 09:23:55 +02:00
|
|
|
|
2022-11-04 00:55:13 +01:00
|
|
|
@IsString()
|
2022-05-21 09:23:55 +02:00
|
|
|
@IsNotEmpty()
|
2022-07-09 04:26:50 +02:00
|
|
|
@ApiProperty({ example: 'Doe' })
|
2022-06-25 19:53:06 +02:00
|
|
|
lastName!: string;
|
2022-02-03 17:06:44 +01:00
|
|
|
}
|