72 lines
1.2 KiB
TypeScript
72 lines
1.2 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { UserResponseDto } from './user-response.dto';
|
|
import { Currency } from 'apps/catalog/src/enums/currency.enum';
|
|
import { ContentAssetDto } from './content-asset.dto';
|
|
|
|
export class ContentPriceResponseDto {
|
|
@ApiProperty()
|
|
id: number;
|
|
|
|
@ApiProperty()
|
|
contentId: number;
|
|
|
|
@ApiProperty()
|
|
price: number;
|
|
|
|
@ApiProperty({ enum: Currency })
|
|
currency: string;
|
|
}
|
|
|
|
export class ContentResponseDto {
|
|
@ApiProperty()
|
|
id: number;
|
|
|
|
@ApiProperty()
|
|
name: string;
|
|
|
|
@ApiProperty()
|
|
description: string;
|
|
|
|
@ApiProperty()
|
|
userId: string;
|
|
|
|
@ApiProperty()
|
|
parentId: number | null;
|
|
|
|
@ApiProperty()
|
|
restricted: boolean;
|
|
|
|
@ApiProperty()
|
|
onsale: boolean;
|
|
|
|
@ApiProperty()
|
|
published: boolean;
|
|
|
|
@ApiProperty()
|
|
commentsEnabled: boolean;
|
|
|
|
@ApiProperty()
|
|
openSource: boolean;
|
|
|
|
@ApiProperty()
|
|
privacy: string;
|
|
|
|
@ApiProperty()
|
|
type: string;
|
|
|
|
@ApiProperty()
|
|
stock: number | null;
|
|
|
|
@ApiProperty()
|
|
license: string;
|
|
|
|
@ApiProperty({ type: ContentPriceResponseDto, isArray: true })
|
|
prices: ContentPriceResponseDto[];
|
|
|
|
@ApiProperty({ type: UserResponseDto })
|
|
user: UserResponseDto;
|
|
|
|
@ApiProperty({ type: ContentAssetDto, isArray: true })
|
|
assets: ContentAssetDto[];
|
|
}
|