|
@@ -2,7 +2,7 @@ import { z } from '@hono/zod-openapi';
|
|
|
import { FileSchema } from '@d8d/file-module-mt/schemas';
|
|
import { FileSchema } from '@d8d/file-module-mt/schemas';
|
|
|
|
|
|
|
|
export const GoodsCategorySchema = z.object({
|
|
export const GoodsCategorySchema = z.object({
|
|
|
- id: z.number().int().positive().openapi({ description: '类别ID' }),
|
|
|
|
|
|
|
+ id: z.number().int().nonnegative('类别ID必须为非负数').openapi({ description: '类别ID' }),
|
|
|
name: z.string().min(1, '类别名称不能为空').max(255, '类别名称最多255个字符').openapi({
|
|
name: z.string().min(1, '类别名称不能为空').max(255, '类别名称最多255个字符').openapi({
|
|
|
description: '类别名称',
|
|
description: '类别名称',
|
|
|
example: '电子产品'
|
|
example: '电子产品'
|