diff --git a/src/entity/product.entity.ts b/src/entity/product.entity.ts index e328725..67fa486 100644 --- a/src/entity/product.entity.ts +++ b/src/entity/product.entity.ts @@ -27,8 +27,8 @@ export class Product { @Column() name: string; - @ApiProperty() - @Column({ default: ''}) + @ApiProperty({ description: '产品中文名称' }) + @Column({ default: '' }) nameCn: string; @ApiProperty({ example: '产品描述', description: '产品描述', type: 'string' }) @@ -39,18 +39,19 @@ export class Product { @Column() categoryId: number; - @ApiProperty() + @ApiProperty({ description: '口味ID' }) @Column() flavorsId: number; - @ApiProperty() + @ApiProperty({ description: '尼古丁强度ID' }) @Column() strengthId: number; - - @ApiProperty() + + @ApiProperty({ description: '湿度' }) @Column() humidity: string; + @ApiProperty({ description: 'sku', type: 'string' }) @Column({ nullable: true }) sku?: string;