Initial commit
This commit is contained in:
36
src/modules/analytics/dto/create-review.dto.ts
Executable file
36
src/modules/analytics/dto/create-review.dto.ts
Executable file
@@ -0,0 +1,36 @@
|
||||
import { IsString, IsNumber, IsOptional, Min, Max } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
export class CreateReviewDto {
|
||||
@ApiProperty({ description: 'User ID' })
|
||||
@IsString()
|
||||
userId: string;
|
||||
|
||||
@ApiProperty({ description: 'Reviewable type', example: 'establishment' })
|
||||
@IsString()
|
||||
reviewableType: string;
|
||||
|
||||
@ApiProperty({ description: 'Reviewable ID' })
|
||||
@IsString()
|
||||
reviewableId: string;
|
||||
|
||||
@ApiProperty({ description: 'Rating (1-5)', example: 5 })
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
@Max(5)
|
||||
rating: number;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Review title', example: 'Amazing experience!' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
title?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Review comment' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
comment?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Review images' })
|
||||
@IsOptional()
|
||||
images?: Record<string, any>;
|
||||
}
|
||||
Reference in New Issue
Block a user