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