bug
This commit is contained in:
@@ -4,7 +4,7 @@ import { Type } from 'class-transformer';
|
||||
|
||||
export class CreateCategoryDto {
|
||||
@IsString()
|
||||
@ApiPropertyOptional({ example: 'Beverages' })
|
||||
@ApiPropertyOptional({ example: 'ایرانی' })
|
||||
title!: string;
|
||||
|
||||
@IsOptional()
|
||||
|
||||
@@ -2,95 +2,95 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsString, IsOptional, IsNumber, IsBoolean, IsArray, IsUrl } from 'class-validator';
|
||||
|
||||
export class CreateRestaurantDto {
|
||||
@ApiProperty({ example: 'Cafe Morteza' })
|
||||
@ApiProperty({ example: 'کافه ژیوان', description: 'نام رستوران' })
|
||||
@IsString()
|
||||
name!: string;
|
||||
|
||||
@ApiProperty({ example: 'cafe-morteza' })
|
||||
@ApiProperty({ example: 'cafe-zhivan', description: 'شناسه (slug) رستوران، لاتین و بدون فاصله' })
|
||||
@IsString()
|
||||
slug!: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://example.com/logo.png' })
|
||||
@ApiPropertyOptional({ example: 'https://example.com/logo.png', description: 'آدرس تصویر لوگو' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
logo?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Tehran, Valiasr St. No. 123' })
|
||||
@ApiPropertyOptional({ example: 'تهران، خیابان ولیعصر پلاک ۱۲۳', description: 'آدرس کامل' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
address?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '#ff6600' })
|
||||
@ApiPropertyOptional({ example: '#ff6600', description: 'رنگ قالب/منو (hex)' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
menuColor?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 35.6892 })
|
||||
@ApiPropertyOptional({ example: 35.6892, description: 'عرض جغرافیایی (latitude)' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
latitude?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: 51.389 })
|
||||
@ApiPropertyOptional({ example: 51.389, description: 'طول جغرافیایی (longitude)' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
longitude?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: 5000, description: 'Service area in meters' })
|
||||
@ApiPropertyOptional({ example: 5000, description: 'حوزه سرویسدهی به متر' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
serviceArea?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: 2020 })
|
||||
@ApiPropertyOptional({ example: 2020, description: 'سال تأسیس' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
establishedYear?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: '+989123456789' })
|
||||
@ApiPropertyOptional({ example: '+989123456789', description: 'شماره تماس' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
phoneNumber?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza' })
|
||||
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'آدرس اینستاگرام' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
instagram?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://t.me/cafemorteza' })
|
||||
@ApiPropertyOptional({ example: 'https://t.me/cafemorteza', description: 'آدرس تلگرام' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
telegram?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://wa.me/989123456789' })
|
||||
@ApiPropertyOptional({ example: 'https://wa.me/989123456789', description: 'لینک واتساپ' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
whatsapp?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Cozy place with best coffee in town.' })
|
||||
@ApiPropertyOptional({ example: 'محل دنج با بهترین قهوه شهر.', description: 'توضیحات درباره رستوران' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Best Cafe in Tehran' })
|
||||
@ApiPropertyOptional({ example: 'بهترین کافه تهران', description: 'عنوان برای SEO' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
seoTitle?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Cafe Morteza serves high-quality coffee.' })
|
||||
@ApiPropertyOptional({ example: 'کافه مرتضی ارائهدهنده قهوه با کیفیت بالا.', description: 'توضیحات برای SEO' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
seoDescription?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: ['coffee', 'breakfast', 'cafe'] })
|
||||
@ApiPropertyOptional({ example: ['قهوه', 'صبحانه', 'کافه'], description: 'لیست تگهای مرتبط' })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
tagNames?: string[];
|
||||
|
||||
@ApiPropertyOptional({ example: true })
|
||||
@ApiPropertyOptional({ example: true, description: 'آیا رستوران اکنون باز است؟' })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
isOpenNow?: boolean;
|
||||
|
||||
@ApiPropertyOptional({ example: 0.09 })
|
||||
@ApiPropertyOptional({ example: 0.09, description: 'نرخ مالیات (مثلاً 0.09 برای 9%)' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
vat?: number;
|
||||
|
||||
Reference in New Issue
Block a user