Initial commit: Full project structure
- Backend: NestJS with Docker - Frontend: Next.js with Docker - Nginx configuration for reverse proxy - PostgreSQL setup - Docker compose for orchestration - Development environment configuration
This commit is contained in:
23
backend/src/modules/auth/dto/login.dto.ts
Normal file
23
backend/src/modules/auth/dto/login.dto.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// backend/src/modules/auth/dto/login.dto.ts
|
||||
import { IsEmail, IsString, MinLength } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class LoginDto {
|
||||
@ApiProperty({
|
||||
description: 'User email address',
|
||||
example: 'user@example.com',
|
||||
required: true,
|
||||
})
|
||||
@IsEmail({}, { message: 'Please provide a valid email address' })
|
||||
email: string;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'User password (min 6 characters)',
|
||||
example: 'password123',
|
||||
required: true,
|
||||
minLength: 6,
|
||||
})
|
||||
@IsString()
|
||||
@MinLength(6, { message: 'Password must be at least 6 characters long' })
|
||||
password: string;
|
||||
}
|
||||
6
backend/src/modules/auth/dto/oauth.dto.ts
Normal file
6
backend/src/modules/auth/dto/oauth.dto.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class OAuthUserDto {
|
||||
email: string;
|
||||
name: string;
|
||||
googleId?: string;
|
||||
facebookId?: string;
|
||||
}
|
||||
19
backend/src/modules/auth/dto/register.dto.ts
Normal file
19
backend/src/modules/auth/dto/register.dto.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { IsEmail, IsString, MinLength, IsEnum } from 'class-validator';
|
||||
|
||||
export class RegisterDto {
|
||||
@IsEmail()
|
||||
email: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
password: string;
|
||||
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
@IsString()
|
||||
organizationName: string;
|
||||
|
||||
@IsEnum(['CLINIC', 'LAB'])
|
||||
organizationType: 'CLINIC' | 'LAB';
|
||||
}
|
||||
Reference in New Issue
Block a user