feat: expand backend admin marketplace and scaling
فشلت بعض الفحوصات
/ deploy (push) Failing after 1m22s
فشلت بعض الفحوصات
/ deploy (push) Failing after 1m22s
هذا الالتزام موجود في:
73
src/modules/posts/dto/create-reel.dto.ts
Normal file
73
src/modules/posts/dto/create-reel.dto.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Transform } from 'class-transformer';
|
||||
import {
|
||||
ArrayMaxSize,
|
||||
IsArray,
|
||||
IsEnum,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUrl,
|
||||
Length,
|
||||
Max,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
import { PostVisibility } from '../../../common/enums/post-visibility.enum';
|
||||
import { toStringArray } from '../../../common/utils/array-transform.util';
|
||||
|
||||
export class CreateReelDto {
|
||||
@ApiPropertyOptional({ maxLength: 2200, description: 'Reel caption' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 2200)
|
||||
content?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Reel video URL (if not uploading videoFile)' })
|
||||
@IsOptional()
|
||||
@IsUrl({ require_tld: false })
|
||||
videoUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Video duration in seconds' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
@Max(7200)
|
||||
durationSeconds?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Video thumbnail URL' })
|
||||
@IsOptional()
|
||||
@IsUrl({ require_tld: false })
|
||||
thumbnailUrl?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Music style or genre for the reel', maxLength: 80 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 80)
|
||||
style?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Maqam name for the reel', maxLength: 80 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 80)
|
||||
maqam?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'Rhythm signature like 6/8 for the reel', maxLength: 40 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(0, 40)
|
||||
rhythmSignature?: string;
|
||||
|
||||
@ApiPropertyOptional({ type: [String], description: 'Mention usernames like rami_sabry (max 30)' })
|
||||
@IsOptional()
|
||||
@Transform(toStringArray)
|
||||
@IsArray()
|
||||
@ArrayMaxSize(30)
|
||||
@IsString({ each: true })
|
||||
@Length(1, 30, { each: true })
|
||||
mentionUsernames?: string[];
|
||||
|
||||
@ApiPropertyOptional({ enum: PostVisibility, default: PostVisibility.PUBLIC })
|
||||
@IsOptional()
|
||||
@IsEnum(PostVisibility)
|
||||
visibility?: PostVisibility;
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم