🚀 Initialize Musadaq SaaS: Full Backend + AI + React Dashboard + Docker Setup
This commit is contained in:
16
backend/src/modules/auth/dto/login.dto.ts
Normal file
16
backend/src/modules/auth/dto/login.dto.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* ════════════════════════════════════════════════════════════
|
||||
* مُصادَق (Musadaq) — Login DTO
|
||||
* ════════════════════════════════════════════════════════════
|
||||
*/
|
||||
|
||||
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class LoginDto {
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
password!: string;
|
||||
}
|
||||
31
backend/src/modules/auth/dto/register.dto.ts
Normal file
31
backend/src/modules/auth/dto/register.dto.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* ════════════════════════════════════════════════════════════
|
||||
* مُصادَق (Musadaq) — Register DTO
|
||||
* ════════════════════════════════════════════════════════════
|
||||
*/
|
||||
|
||||
import { IsEmail, IsNotEmpty, IsString, MinLength, IsOptional, Matches } from 'class-validator';
|
||||
|
||||
export class RegisterDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
tenantName!: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name!: string;
|
||||
|
||||
@IsEmail()
|
||||
email!: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(8)
|
||||
@Matches(/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
|
||||
message: 'Password is too weak (Must have uppercase, lowercase, and number/special char)',
|
||||
})
|
||||
password!: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
phone?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user