diff --git a/src/modules/restaurants/dto/create-restaurant.dto.ts b/src/modules/restaurants/dto/create-restaurant.dto.ts index 9102718..c61a247 100644 --- a/src/modules/restaurants/dto/create-restaurant.dto.ts +++ b/src/modules/restaurants/dto/create-restaurant.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; -import { IsString, IsOptional, IsNumber, IsBoolean, IsArray, IsUrl } from 'class-validator'; +import { IsString, IsOptional, IsNumber, IsBoolean, IsArray, IsUrl, IsObject } from 'class-validator'; export class CreateRestaurantDto { @ApiProperty({ example: 'کافه ژیوان', description: 'نام رستوران' }) @@ -129,4 +129,30 @@ export class CreateRestaurantDto { @IsOptional() @IsNumber() vat?: number; + + @ApiPropertyOptional({ + example: { + purchaseAmount: '100000', + purchaseScore: '100000', + scoreAmount: '100000', + scoreCredit: '100000', + birthdayScore: '100000', + registerScore: '100000', + marriageDateScore: '100000', + referrerScore: '100000', + }, + description: 'مشخصات امتیازات', + }) + @IsOptional() + @IsObject() + scorePrice?: { + purchaseAmount: string; + purchaseScore: string; + scoreAmount: string; + scoreCredit: string; + birthdayScore: string; + registerScore: string; + marriageDateScore: string; + referrerScore: string; + }; }