|
|
@@ -28,7 +28,6 @@
|
|
|
|
|
|
```typescript
|
|
|
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
|
|
-import { z } from '@hono/zod-openapi';
|
|
|
|
|
|
@Entity('table_name') // 使用小写下划线命名表名
|
|
|
export class EntityName {
|
|
|
@@ -107,6 +106,7 @@ updatedAt!: Date;
|
|
|
### 7.1 基础类型规范
|
|
|
|
|
|
```typescript
|
|
|
+import { z } from '@hono/zod-openapi';
|
|
|
export const EntitySchema = z.object({
|
|
|
id: z.number().int().positive().openapi({ description: 'ID说明' }),
|
|
|
// 字符串字段
|