| 1 | import { createZodDto } from '@yikart/common' |
| 2 | import { z } from 'zod' |
| 3 | |
| 4 | export enum ConfigFileFormat { |
| 5 | Json = 'json', |
| 6 | Yaml = 'yaml', |
| 7 | } |
| 8 | |
| 9 | export const ConfigEditorConfigVoSchema = z.object({ |
| 10 | config: z.record(z.string(), z.unknown()).describe('配置对象'), |
| 11 | format: z.enum(ConfigFileFormat).describe('配置文件格式'), |
| 12 | }) |
| 13 | |
| 14 | export class ConfigEditorConfigVo extends createZodDto(ConfigEditorConfigVoSchema, 'ConfigEditorConfigVo') {} |
| 15 |