Add images property to CreateRestaurantDto and Restaurant entity; update UploaderController with AdminAuthGuard and API tags for enhanced security and documentation.

This commit is contained in:
2025-11-18 10:30:45 +03:30
parent 6f22dddcec
commit 82f5cae16f
3 changed files with 19 additions and 6 deletions
@@ -85,6 +85,16 @@ export class CreateRestaurantDto {
@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()
@@ -63,6 +63,10 @@ export class Restaurant extends BaseEntity {
@Property({ nullable: true, type: 'json' })
tagNames?: string[];
// --- تصاویر ---
@Property({ nullable: true, type: 'json' })
images?: string[];
// --- مالیات یا VAT ---
@Property({ type: 'decimal', default: 0 })
vat?: number = 0;