first commit
هذا الالتزام موجود في:
26
src/modules/posts/dto/update-post.dto.ts
Normal file
26
src/modules/posts/dto/update-post.dto.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsEnum, IsOptional, IsString, IsUrl, Length } from 'class-validator';
|
||||
import { PostVisibility } from '../../../common/enums/post-visibility.enum';
|
||||
|
||||
export class UpdatePostDto {
|
||||
@ApiPropertyOptional({ maxLength: 2200 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(1, 2200)
|
||||
content?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Set video URL. If provided, audioUrl will be cleared.' })
|
||||
@IsOptional()
|
||||
@IsUrl({ require_tld: false })
|
||||
videoUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Set audio URL. If provided, videoUrl will be cleared.' })
|
||||
@IsOptional()
|
||||
@IsUrl({ require_tld: false })
|
||||
audioUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({ enum: PostVisibility })
|
||||
@IsOptional()
|
||||
@IsEnum(PostVisibility)
|
||||
visibility?: PostVisibility;
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم