feat: 新增客户端作品展示模块
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
ArrayMaxSize,
|
||||
IsArray,
|
||||
IsDateString,
|
||||
IsEnum,
|
||||
@@ -31,6 +32,12 @@ export class MediaItemDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
type?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '展示说明' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(1000)
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export class CreateArtworkDto {
|
||||
@@ -68,6 +75,14 @@ export class CreateArtworkDto {
|
||||
@Type(() => MediaItemDto)
|
||||
images?: MediaItemDto[];
|
||||
|
||||
@ApiPropertyOptional({ description: '客户端作品展示图片', type: [MediaItemDto] })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ArrayMaxSize(30)
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => MediaItemDto)
|
||||
showcaseImages?: MediaItemDto[];
|
||||
|
||||
@ApiPropertyOptional({ description: '状态', enum: ArtworkStatus })
|
||||
@IsOptional()
|
||||
@IsEnum(ArtworkStatus)
|
||||
@@ -192,6 +207,14 @@ export class UpdateArtworkDto {
|
||||
@Type(() => MediaItemDto)
|
||||
images?: MediaItemDto[];
|
||||
|
||||
@ApiPropertyOptional({ description: '客户端作品展示图片', type: [MediaItemDto] })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ArrayMaxSize(30)
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => MediaItemDto)
|
||||
showcaseImages?: MediaItemDto[];
|
||||
|
||||
@ApiPropertyOptional({ description: '状态', enum: ArtworkStatus })
|
||||
@IsOptional()
|
||||
@IsEnum(ArtworkStatus)
|
||||
|
||||
Reference in New Issue
Block a user