update notif content
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsString, IsOptional, IsNumber, IsBoolean, IsArray, IsUrl, IsObject, IsEnum } from 'class-validator';
|
||||
import { PlanEnum } from '../interface/plan.interface';
|
||||
import { IsString, IsOptional, IsNumber } from 'class-validator';
|
||||
|
||||
export class CreateRestaurantDto {
|
||||
@ApiProperty({ example: 'کافه ژیوان', description: 'نام رستوران' })
|
||||
@@ -11,56 +10,6 @@ export class CreateRestaurantDto {
|
||||
@IsString()
|
||||
slug!: string;
|
||||
|
||||
@ApiProperty({ example: 'zhivan.example.com', description: 'دامنه رستوران' })
|
||||
@IsString()
|
||||
domain!: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://example.com/logo.png', description: 'آدرس تصویر لوگو' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
logo?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'تهران، خیابان ولیعصر پلاک ۱۲۳', description: 'آدرس کامل' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
address?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '#ff6600', description: 'رنگ قالب/منو (hex)' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
menuColor?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 35.6892, description: 'عرض جغرافیایی (latitude)' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
latitude?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: 51.389, description: 'طول جغرافیایی (longitude)' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
longitude?: number;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: {
|
||||
type: 'Polygon',
|
||||
coordinates: [
|
||||
[
|
||||
[51.389, 35.6892],
|
||||
[51.39, 35.6892],
|
||||
[51.39, 35.6902],
|
||||
[51.389, 35.6902],
|
||||
[51.389, 35.6892],
|
||||
],
|
||||
],
|
||||
},
|
||||
description: 'محدوده سرویسدهی به صورت GeoJSON Polygon',
|
||||
})
|
||||
@IsOptional()
|
||||
serviceArea?: {
|
||||
type: 'Polygon';
|
||||
coordinates: number[][][];
|
||||
};
|
||||
|
||||
@ApiPropertyOptional({ example: 2020, description: 'سال تأسیس' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@@ -71,88 +20,4 @@ export class CreateRestaurantDto {
|
||||
@IsString()
|
||||
phone?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'آدرس اینستاگرام' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
instagram?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://t.me/cafemorteza', description: 'آدرس تلگرام' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
telegram?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'https://wa.me/989123456789', description: 'لینک واتساپ' })
|
||||
@IsOptional()
|
||||
@IsUrl()
|
||||
whatsapp?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'محل دنج با بهترین قهوه شهر.', description: 'توضیحات درباره رستوران' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'بهترین کافه تهران', description: 'عنوان برای SEO' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
seoTitle?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'کافه مرتضی ارائهدهنده قهوه با کیفیت بالا.', description: 'توضیحات برای SEO' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
seoDescription?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: ['قهوه', 'صبحانه', 'کافه'], description: 'لیست تگهای مرتبط' })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
tagNames?: string[];
|
||||
|
||||
@ApiPropertyOptional({
|
||||
example: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
|
||||
description: 'لیست آدرس تصاویر رستوران',
|
||||
type: [String],
|
||||
})
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@IsUrl({}, { each: true })
|
||||
images?: string[];
|
||||
|
||||
@ApiPropertyOptional({ example: true, description: 'آیا رستوران اکنون باز است؟' })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
isOpenNow?: boolean;
|
||||
|
||||
@ApiPropertyOptional({ example: 0.09, description: 'نرخ مالیات (مثلاً 0.09 برای 9%)' })
|
||||
@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()
|
||||
score?: {
|
||||
purchaseAmount: string;
|
||||
purchaseScore: string;
|
||||
scoreAmount: string;
|
||||
scoreCredit: string;
|
||||
birthdayScore: string;
|
||||
registerScore: string;
|
||||
marriageDateScore: string;
|
||||
referrerScore: string;
|
||||
};
|
||||
|
||||
@ApiProperty({ example: true, description: 'PlanEnum.Base', enum: PlanEnum })
|
||||
@IsEnum(PlanEnum)
|
||||
plan: PlanEnum;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user