Files
backend-service/src/pet-feeder/vo/product.vo.ts
T

45 lines
793 B
TypeScript

import { BaseVo } from '@/core/vo/base.vo';
import { ApiProperty, ApiSchema } from '@nestjs/swagger';
import { ProductCategory } from '@/pet-feeder/enum/product-category';
@ApiSchema({
name: 'Product',
})
export class ProductVo extends BaseVo {
@ApiProperty()
name: string;
@ApiProperty({
example: [ProductCategory.DRY_FOOD, ProductCategory.WET_FOOD],
})
category: string;
@ApiProperty()
photo: string;
@ApiProperty()
tags: string[];
@ApiProperty()
totalWeight: number;
@ApiProperty()
protein: number;
@ApiProperty()
fat: number;
@ApiProperty()
fiber: number;
@ApiProperty()
ash: number;
@ApiProperty()
moisture: number;
@ApiProperty({
description: '产品总能量(kcal),基于ME算法计算',
})
totalCalories: number;
}