update city and provincve
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { IsString, IsOptional, IsNumber, IsBoolean, Min, Max } from 'class-validator';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { ApiPropertyOptional,ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
/**
|
||||
* DTO for updating a user address.
|
||||
@@ -15,15 +15,13 @@ export class UpdateUserAddressDto {
|
||||
@IsString()
|
||||
address?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'City name', example: 'Tehran' })
|
||||
@IsOptional()
|
||||
@ApiProperty({ description: 'City name', example: 'Tehran' })
|
||||
@IsString()
|
||||
city?: string;
|
||||
city: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Province', example: 'Tehran Province' })
|
||||
@IsOptional()
|
||||
@ApiProperty({ description: 'Province', example: 'Tehran Province' })
|
||||
@IsString()
|
||||
province?: string;
|
||||
province: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Postal/ZIP code', example: '12345-6789' })
|
||||
@IsOptional()
|
||||
|
||||
@@ -14,10 +14,10 @@ export class UserAddress extends BaseEntity {
|
||||
address!: string;
|
||||
|
||||
@Property()
|
||||
city!: string;
|
||||
city: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
province?: string;
|
||||
@Property()
|
||||
province: string;
|
||||
|
||||
@Property({ nullable: true })
|
||||
postalCode?: string | null = null;
|
||||
|
||||
Reference in New Issue
Block a user