feat: 完善艺术品审核变更流程
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { IsBoolean } from 'class-validator';
|
||||
import { ArtworkStatus, AuditStatus, CertType, NodeType } from '@artveris/shared';
|
||||
import { ArtworkRevisionStatus, ArtworkStatus, AuditStatus, CertType, NodeType } from '@artveris/shared';
|
||||
import { PaginationDto } from '../../common/dto/pagination.dto';
|
||||
|
||||
export class MediaItemDto {
|
||||
@@ -150,6 +150,11 @@ export class CreateArtworkCertificateDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
originKey!: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '已有水印文件 key' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
watermarkKey?: string;
|
||||
}
|
||||
|
||||
export class UpdateArtworkDto {
|
||||
@@ -181,6 +186,32 @@ export class UpdateArtworkDto {
|
||||
@IsOptional()
|
||||
@IsEnum(ArtworkStatus)
|
||||
status?: ArtworkStatus;
|
||||
|
||||
@ApiPropertyOptional({ description: '变更标题' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(120)
|
||||
revisionTitle?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '变更原因 / 修改说明' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(1000)
|
||||
revisionReason?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '保存时一并提交的溯源时间轴', type: () => [CreateArtworkTraceNodeDto] })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => CreateArtworkTraceNodeDto)
|
||||
traceNodes?: CreateArtworkTraceNodeDto[];
|
||||
|
||||
@ApiPropertyOptional({ description: '保存时一并提交的认证文件', type: () => [CreateArtworkCertificateDto] })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => CreateArtworkCertificateDto)
|
||||
certificates?: CreateArtworkCertificateDto[];
|
||||
}
|
||||
|
||||
export class QueryArtworkDto extends PaginationDto {
|
||||
@@ -216,4 +247,21 @@ export class AuditArtworkDto {
|
||||
@IsString()
|
||||
@MaxLength(255)
|
||||
remark?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '审核变更稿 ID;为空时审核作品当前版本' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
revisionId?: string;
|
||||
}
|
||||
|
||||
export class QueryArtworkRevisionDto extends PaginationDto {
|
||||
@ApiPropertyOptional({ description: '关键词(作品名称 / 档案编号 / 变更标题)' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
keyword?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: '审核状态', enum: ArtworkRevisionStatus })
|
||||
@IsOptional()
|
||||
@IsEnum(ArtworkRevisionStatus)
|
||||
status?: ArtworkRevisionStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user