Add password login, set-password, business images migration, and user serialization.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-23 12:10:30 +03:30
co-authored by Cursor
parent 715ca585a8
commit 97a9ee022f
11 changed files with 290 additions and 36 deletions
@@ -0,0 +1,15 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, MaxLength, MinLength } from 'class-validator';
import { IsIranMobile } from '../../../common/decorators/is-iran-mobile.decorator';
export class LoginPasswordDto {
@ApiProperty({ example: '09122222222' })
@IsIranMobile()
mobile!: string;
@ApiProperty({ example: 'mySecurePass123' })
@IsString()
@MinLength(1)
@MaxLength(72)
password!: string;
}
+22
View File
@@ -0,0 +1,22 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsString, MaxLength, MinLength } from 'class-validator';
export class SetPasswordDto {
@ApiPropertyOptional({ description: 'Required when changing an existing password' })
@IsOptional()
@IsString()
@MaxLength(72)
currentPassword?: string;
@ApiProperty({ example: 'mySecurePass123', minLength: 8 })
@IsString()
@MinLength(8)
@MaxLength(72)
password!: string;
@ApiProperty({ example: 'mySecurePass123' })
@IsString()
@MinLength(8)
@MaxLength(72)
confirmPassword!: string;
}