|
|
@@ -90,6 +90,19 @@ export const OrderGoodsSchema = z.object({
|
|
|
description: '更新时间',
|
|
|
example: '2024-01-01T12:00:00Z'
|
|
|
}),
|
|
|
+ imageFileId: z.number().int().positive().nullable().openapi({
|
|
|
+ example: 1,
|
|
|
+ description: '商品图片文件ID'
|
|
|
+ }),
|
|
|
+ imageFile: z.object({
|
|
|
+ id: z.number().int().positive().openapi({ description: '文件ID' }),
|
|
|
+ name: z.string().max(255).openapi({ description: '文件名', example: 'goods.jpg' }),
|
|
|
+ fullUrl: z.string().openapi({ description: '文件完整URL', example: 'https://example.com/goods.jpg' }),
|
|
|
+ type: z.string().nullable().openapi({ description: '文件类型', example: 'image/jpeg' }),
|
|
|
+ size: z.number().nullable().openapi({ description: '文件大小(字节)', example: 102400 })
|
|
|
+ }).nullable().optional().openapi({
|
|
|
+ description: '商品图片文件信息'
|
|
|
+ }),
|
|
|
// 关联实体
|
|
|
order: z.object({
|
|
|
id: z.number().int().positive().openapi({ description: '订单ID' }),
|
|
|
@@ -169,6 +182,10 @@ export const CreateOrderGoodsDto = z.object({
|
|
|
expressNo: z.coerce.number().int().positive().nullable().optional().openapi({
|
|
|
description: '快递单号',
|
|
|
example: 1234567890
|
|
|
+ }),
|
|
|
+ imageFileId: z.number().int().positive().nullable().optional().openapi({
|
|
|
+ description: '商品图片文件ID',
|
|
|
+ example: 1
|
|
|
})
|
|
|
});
|
|
|
|
|
|
@@ -229,6 +246,10 @@ export const UpdateOrderGoodsDto = z.object({
|
|
|
expressNo: z.coerce.number().int().positive().nullable().optional().openapi({
|
|
|
description: '快递单号',
|
|
|
example: 1234567890
|
|
|
+ }),
|
|
|
+ imageFileId: z.number().int().positive().nullable().optional().openapi({
|
|
|
+ description: '商品图片文件ID',
|
|
|
+ example: 1
|
|
|
})
|
|
|
});
|
|
|
|