|
|
@@ -1,6 +1,6 @@
|
|
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, ManyToOne, JoinColumn, OneToMany } from 'typeorm';
|
|
|
import { z } from '@hono/zod-openapi';
|
|
|
-import { Company } from './company.entity';
|
|
|
+import { Company, CompanySchema } from './company.entity';
|
|
|
import { Application } from './application.entity';
|
|
|
import { Favorite } from './favorite.entity';
|
|
|
import { ViewRecord } from './view-record.entity';
|
|
|
@@ -110,6 +110,28 @@ export const SilverJobSchema = z.object({
|
|
|
contactPhone: z.string().max(20).openapi({ description: '联系电话', example: '13800138000' }),
|
|
|
contactEmail: z.string().max(255).email().nullable().optional().openapi({ description: '联系邮箱', example: 'hr@community.com' }),
|
|
|
companyId: z.number().int().positive().openapi({ description: '企业ID', example: 1 }),
|
|
|
+ company: CompanySchema.optional().openapi({
|
|
|
+ description: '关联的企业信息',
|
|
|
+ example: {
|
|
|
+ id: 1,
|
|
|
+ name: '北京科技发展有限公司',
|
|
|
+ shortName: '北京科技',
|
|
|
+ industryCategory: '互联网/IT',
|
|
|
+ companyType: '民营企业',
|
|
|
+ employeeCount: '100-500人',
|
|
|
+ address: '北京市朝阳区科技园区88号',
|
|
|
+ longitude: 116.4074,
|
|
|
+ latitude: 39.9042,
|
|
|
+ contactPerson: '张经理',
|
|
|
+ contactPhone: '13888888888',
|
|
|
+ isCertified: 1,
|
|
|
+ viewCount: 156,
|
|
|
+ favoriteCount: 23,
|
|
|
+ userId: 1,
|
|
|
+ createdAt: new Date('2024-01-01T00:00:00Z'),
|
|
|
+ updatedAt: new Date('2024-01-01T00:00:00Z')
|
|
|
+ }
|
|
|
+ }),
|
|
|
jobType: z.string().max(50).openapi({ description: '岗位类型', example: '兼职教师' }),
|
|
|
requiredSkills: z.string().nullable().optional().openapi({ description: '所需技能', example: '书法、国画、教学经验' }),
|
|
|
benefits: z.string().nullable().optional().openapi({ description: '福利待遇', example: '交通补贴、工作餐、节日福利' }),
|