2026-09-03 16:45:59 +03:30
|
|
|
import {
|
|
|
|
|
IsEmail,
|
|
|
|
|
IsIn,
|
|
|
|
|
IsString,
|
|
|
|
|
MinLength,
|
|
|
|
|
} from 'class-validator';
|
|
|
|
|
import { BUSINESS_FIELDS } from '@mento/shared';
|
2026-08-29 21:06:30 +03:30
|
|
|
|
|
|
|
|
export class LoginDto {
|
|
|
|
|
@IsEmail()
|
|
|
|
|
email!: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(6)
|
|
|
|
|
password!: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class RegisterOrganizationDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(2)
|
|
|
|
|
organizationName!: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(2)
|
|
|
|
|
fullName!: string;
|
|
|
|
|
|
|
|
|
|
@IsEmail()
|
|
|
|
|
email!: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(6)
|
|
|
|
|
password!: string;
|
2026-09-03 16:45:59 +03:30
|
|
|
|
|
|
|
|
@IsIn([...BUSINESS_FIELDS])
|
|
|
|
|
businessField!: (typeof BUSINESS_FIELDS)[number];
|
2026-08-29 21:06:30 +03:30
|
|
|
}
|