|
@@ -29,9 +29,9 @@ export const AreaDataSchema = z.object({
|
|
|
description: '区域ID',
|
|
description: '区域ID',
|
|
|
example: 1
|
|
example: 1
|
|
|
}),
|
|
}),
|
|
|
- parentId: z.number().int().positive().nullable().openapi({
|
|
|
|
|
- description: '父区域ID,自引用',
|
|
|
|
|
- example: 0
|
|
|
|
|
|
|
+ parentId: z.number().int().positive().nullable().openapi({
|
|
|
|
|
+ description: '父区域ID,自引用,顶级区域可不提供',
|
|
|
|
|
+ example: 0
|
|
|
}),
|
|
}),
|
|
|
name: z.string().max(100).openapi({
|
|
name: z.string().max(100).openapi({
|
|
|
description: '区域名称',
|
|
description: '区域名称',
|
|
@@ -48,9 +48,9 @@ export const AreaDataSchema = z.object({
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
export const CreateAreaDataDto = z.object({
|
|
export const CreateAreaDataDto = z.object({
|
|
|
- parentId: z.number().int().positive().nullable().openapi({
|
|
|
|
|
- description: '父区域ID,自引用',
|
|
|
|
|
- example: 0
|
|
|
|
|
|
|
+ parentId: z.number().int().positive().nullable().optional().openapi({
|
|
|
|
|
+ description: '父区域ID,自引用,顶级区域可不提供',
|
|
|
|
|
+ example: 0
|
|
|
}),
|
|
}),
|
|
|
name: z.string().max(100).openapi({
|
|
name: z.string().max(100).openapi({
|
|
|
description: '区域名称',
|
|
description: '区域名称',
|