|
|
@@ -20,138 +20,88 @@ export enum JobSeekingStatus {
|
|
|
}
|
|
|
|
|
|
export const CreateSilverUserProfileDto = z.object({
|
|
|
- userId: z.coerce.number().int().positive().openapi({
|
|
|
- description: '关联用户ID',
|
|
|
- example: 1
|
|
|
- }),
|
|
|
- realName: z.string().max(50).openapi({
|
|
|
- description: '真实姓名',
|
|
|
- example: '张三'
|
|
|
- }),
|
|
|
- nickname: z.string().max(50).optional().openapi({
|
|
|
- description: '网名/昵称',
|
|
|
- example: '银龄达人'
|
|
|
- }),
|
|
|
- organization: z.string().max(255).optional().openapi({
|
|
|
- description: '所属机构/单位',
|
|
|
- example: '北京市老年协会'
|
|
|
- }),
|
|
|
- age: z.coerce.number().int().min(50).max(100).openapi({
|
|
|
- description: '年龄',
|
|
|
- example: 65
|
|
|
- }),
|
|
|
- gender: z.coerce.number().int().min(1).max(3).openapi({
|
|
|
- description: '性别 1:男 2:女 3:其他',
|
|
|
- example: 1
|
|
|
- }),
|
|
|
- phone: z.string().max(20).openapi({
|
|
|
- description: '联系电话',
|
|
|
- example: '13800138000'
|
|
|
- }),
|
|
|
- email: z.string().max(255).email().optional().openapi({
|
|
|
- description: '邮箱地址',
|
|
|
- example: 'user@example.com'
|
|
|
- }),
|
|
|
- avatarUrl: z.string().max(500).url().optional().openapi({
|
|
|
- description: '头像URL',
|
|
|
- example: 'https://example.com/avatar.jpg'
|
|
|
- }),
|
|
|
- personalIntro: z.string().optional().openapi({
|
|
|
- description: '个人简介',
|
|
|
- example: '具有30年教育经验的退休教师,擅长老年教育和培训'
|
|
|
- }),
|
|
|
- personalSkills: z.string().optional().openapi({
|
|
|
- description: '个人技能',
|
|
|
- example: '钢琴,书法,英语,老年心理辅导'
|
|
|
- }),
|
|
|
- personalExperience: z.string().optional().openapi({
|
|
|
- description: '个人履历',
|
|
|
- example: '1985-2015 北京市第一中学教师,2015-至今 社区志愿者'
|
|
|
- }),
|
|
|
- jobSeekingRequirements: z.string().optional().openapi({
|
|
|
- description: '求职需求',
|
|
|
- example: '寻求教育咨询或培训类兼职工作,时间灵活'
|
|
|
- })
|
|
|
+ realName: z.string().max(50).openapi({ description: '真实姓名', example: '张三' }),
|
|
|
+ age: z.coerce.number().int().min(1).max(120).openapi({ description: '年龄', example: 65 }),
|
|
|
+ gender: z.coerce.number().int().min(1).max(3).openapi({ description: '性别:1-男,2-女,3-其他', example: 1 }),
|
|
|
+ phone: z.string().max(20).openapi({ description: '联系电话', example: '13800138000' }),
|
|
|
+ nickname: z.string().max(50).optional().openapi({ description: '昵称', example: '张大爷' }),
|
|
|
+ organization: z.string().max(255).optional().openapi({ description: '所属组织/机构', example: '社区服务中心' }),
|
|
|
+ email: z.string().max(255).email().optional().openapi({ description: '电子邮箱', example: 'example@email.com' }),
|
|
|
+ avatarFileId: z.number().int().positive().optional().openapi({
|
|
|
+ example: 1,
|
|
|
+ description: '头像文件ID'
|
|
|
+ }),
|
|
|
+ personalIntro: z.string().optional().openapi({ description: '个人简介', example: '退休教师,热爱教育事业' }),
|
|
|
+ personalSkills: z.string().optional().openapi({ description: '个人技能', example: '书法、绘画、音乐教学' }),
|
|
|
+ personalExperience: z.string().optional().openapi({ description: '个人经历', example: '从事教育工作40年,经验丰富' }),
|
|
|
+ certificationInfo: z.string().optional().openapi({ description: '认证信息', example: '教师资格证、工作经验证明' }),
|
|
|
+ jobSeekingRequirements: z.string().optional().openapi({ description: '求职需求', example: '希望找兼职教师工作,每周工作3天' })
|
|
|
});
|
|
|
|
|
|
-export const UpdateSilverUserProfileDto = CreateSilverUserProfileDto.partial().extend({
|
|
|
- certificationStatus: z.coerce.number().int().min(0).max(3).optional().openapi({
|
|
|
- description: '认证状态 0:未认证 1:待认证 2:已认证 3:认证失败',
|
|
|
- example: 2
|
|
|
- }),
|
|
|
- certificationInfo: z.string().optional().openapi({
|
|
|
- description: '认证信息',
|
|
|
- example: '教师资格证,心理咨询师证'
|
|
|
- }),
|
|
|
- jobSeekingStatus: z.coerce.number().int().min(0).max(2).optional().openapi({
|
|
|
- description: '求职状态 0:不求职 1:积极求职 2:观望中',
|
|
|
- example: 1
|
|
|
- })
|
|
|
+export const UpdateSilverUserProfileDto = z.object({
|
|
|
+ realName: z.string().max(50).optional().openapi({ description: '真实姓名', example: '张三' }),
|
|
|
+ age: z.coerce.number().int().min(1).max(120).optional().openapi({ description: '年龄', example: 65 }),
|
|
|
+ gender: z.coerce.number().int().min(1).max(3).optional().openapi({ description: '性别:1-男,2-女,3-其他', example: 1 }),
|
|
|
+ phone: z.string().max(20).optional().openapi({ description: '联系电话', example: '13800138000' }),
|
|
|
+ nickname: z.string().max(50).optional().openapi({ description: '昵称', example: '张大爷' }),
|
|
|
+ organization: z.string().max(255).optional().openapi({ description: '所属组织/机构', example: '社区服务中心' }),
|
|
|
+ email: z.string().max(255).email().optional().openapi({ description: '电子邮箱', example: 'example@email.com' }),
|
|
|
+ avatarFileId: z.number().int().positive().optional().openapi({
|
|
|
+ example: 1,
|
|
|
+ description: '头像文件ID'
|
|
|
+ }),
|
|
|
+ personalIntro: z.string().optional().openapi({ description: '个人简介', example: '退休教师,热爱教育事业' }),
|
|
|
+ personalSkills: z.string().optional().openapi({ description: '个人技能', example: '书法、绘画、音乐教学' }),
|
|
|
+ personalExperience: z.string().optional().openapi({ description: '个人经历', example: '从事教育工作40年,经验丰富' }),
|
|
|
+ certificationInfo: z.string().optional().openapi({ description: '认证信息', example: '教师资格证、工作经验证明' }),
|
|
|
+ jobSeekingRequirements: z.string().optional().openapi({ description: '求职需求', example: '希望找兼职教师工作,每周工作3天' })
|
|
|
});
|
|
|
|
|
|
export const SilverUserProfileSchema = z.object({
|
|
|
- id: z.number().int().positive().openapi({
|
|
|
- description: '用户档案ID',
|
|
|
- example: 1
|
|
|
- }),
|
|
|
- userId: z.number().int().positive().openapi({
|
|
|
- description: '关联用户ID',
|
|
|
- example: 1
|
|
|
- }),
|
|
|
- realName: z.string().max(50).openapi({
|
|
|
- description: '真实姓名',
|
|
|
- example: '张三'
|
|
|
- }),
|
|
|
- nickname: z.string().max(50).nullable().openapi({
|
|
|
- description: '网名/昵称',
|
|
|
- example: '银龄达人'
|
|
|
- }),
|
|
|
- organization: z.string().max(255).nullable().openapi({
|
|
|
- description: '所属机构/单位',
|
|
|
- example: '北京市老年协会'
|
|
|
- }),
|
|
|
- age: z.number().int().min(50).max(100).openapi({
|
|
|
- description: '年龄',
|
|
|
- example: 65
|
|
|
- }),
|
|
|
- gender: z.number().int().min(1).max(3).openapi({
|
|
|
- description: '性别 1:男 2:女 3:其他',
|
|
|
- example: 1
|
|
|
- }),
|
|
|
- phone: z.string().max(20).openapi({
|
|
|
- description: '联系电话',
|
|
|
- example: '13800138000'
|
|
|
- }),
|
|
|
- email: z.string().max(255).email().nullable().openapi({
|
|
|
- description: '邮箱地址',
|
|
|
- example: 'user@example.com'
|
|
|
- }),
|
|
|
- avatarUrl: z.string().max(500).url().nullable().openapi({
|
|
|
- description: '头像URL',
|
|
|
- example: 'https://example.com/avatar.jpg'
|
|
|
- }),
|
|
|
- personalIntro: z.string().nullable().openapi({
|
|
|
- description: '个人简介',
|
|
|
- example: '具有30年教育经验的退休教师,擅长老年教育和培训'
|
|
|
- }),
|
|
|
- personalSkills: z.string().nullable().openapi({
|
|
|
- description: '个人技能',
|
|
|
- example: '钢琴,书法,英语,老年心理辅导'
|
|
|
- }),
|
|
|
- personalExperience: z.string().nullable().openapi({
|
|
|
- description: '个人履历',
|
|
|
- example: '1985-2015 北京市第一中学教师,2015-至今 社区志愿者'
|
|
|
- }),
|
|
|
- certificationStatus: z.number().int().min(0).max(3).openapi({
|
|
|
- description: '认证状态 0:未认证 1:待认证 2:已认证 3:认证失败',
|
|
|
- example: 2
|
|
|
- }),
|
|
|
- certificationInfo: z.string().nullable().openapi({
|
|
|
- description: '认证信息',
|
|
|
- example: '教师资格证,心理咨询师证'
|
|
|
- }),
|
|
|
- jobSeekingStatus: z.number().int().min(0).max(2).openapi({
|
|
|
- description: '求职状态 0:不求职 1:积极求职 2:观望中',
|
|
|
- example: 1
|
|
|
- })
|
|
|
+ id: z.number().int().positive().openapi({ description: '用户资料ID', example: 1 }),
|
|
|
+ userId: z.number().int().positive().openapi({ description: '关联用户ID', example: 1 }),
|
|
|
+ realName: z.string().max(50).openapi({ description: '真实姓名', example: '张三' }),
|
|
|
+ nickname: z.string().max(50).nullable().optional().openapi({ description: '昵称', example: '张大爷' }),
|
|
|
+ organization: z.string().max(255).nullable().optional().openapi({ description: '所属组织/机构', example: '社区服务中心' }),
|
|
|
+ age: z.number().int().min(1).max(120).openapi({ description: '年龄', example: 65 }),
|
|
|
+ gender: z.number().int().min(1).max(3).openapi({ description: '性别:1-男,2-女,3-其他', example: 1 }),
|
|
|
+ phone: z.string().max(20).openapi({ description: '联系电话', example: '13800138000' }),
|
|
|
+ email: z.string().max(255).email().nullable().optional().openapi({ description: '电子邮箱', example: 'example@email.com' }),
|
|
|
+ avatarFileId: z.number().int().positive().nullable().optional().openapi({
|
|
|
+ example: 1,
|
|
|
+ description: '头像文件ID'
|
|
|
+ }),
|
|
|
+ avatarFile: z.object({
|
|
|
+ id: z.number().int().positive().openapi({ description: '文件ID' }),
|
|
|
+ name: z.string().max(255).openapi({ description: '文件名', example: 'avatar.jpg' }),
|
|
|
+ fullUrl: z.string().openapi({ description: '文件完整URL', example: 'https://example.com/avatar.jpg' }),
|
|
|
+ type: z.string().nullable().openapi({ description: '文件类型', example: 'image/jpeg' }),
|
|
|
+ size: z.number().nullable().openapi({ description: '文件大小(字节)', example: 102400 })
|
|
|
+ }).nullable().optional().openapi({
|
|
|
+ description: '头像文件信息'
|
|
|
+ }),
|
|
|
+ personalIntro: z.string().nullable().optional().openapi({ description: '个人简介', example: '退休教师,热爱教育事业' }),
|
|
|
+ personalSkills: z.string().nullable().optional().openapi({ description: '个人技能', example: '书法、绘画、音乐教学' }),
|
|
|
+ personalExperience: z.string().nullable().optional().openapi({ description: '个人经历', example: '从事教育工作40年,经验丰富' }),
|
|
|
+ certificationStatus: z.number().int().min(0).max(3).openapi({ description: '认证状态:0-未认证,1-认证中,2-已认证,3-已拒绝', example: 0 }),
|
|
|
+ certificationInfo: z.string().nullable().optional().openapi({ description: '认证信息', example: '教师资格证、工作经验证明' }),
|
|
|
+ jobSeekingStatus: z.number().int().min(0).max(2).openapi({ description: '求职状态:0-未求职,1-积极求职,2-观望机会', example: 0 }),
|
|
|
+ jobSeekingRequirements: z.string().nullable().optional().openapi({ description: '求职需求', example: '希望找兼职教师工作,每周工作3天' }),
|
|
|
+ totalPoints: z.number().int().min(0).openapi({ description: '总积分', example: 100 }),
|
|
|
+ resumeCount: z.number().int().min(0).openapi({ description: '简历数量', example: 1 }),
|
|
|
+ applicationCount: z.number().int().min(0).openapi({ description: '投递数量', example: 5 }),
|
|
|
+ timeBankHours: z.coerce.number().openapi({ description: '时间银行小时数', example: 10.5 }),
|
|
|
+ knowledgeContributions: z.number().int().min(0).openapi({ description: '知识贡献数', example: 3 }),
|
|
|
+ knowledgeShareCount: z.number().int().min(0).openapi({ description: '知识分享数', example: 3 }),
|
|
|
+ knowledgeDownloadCount: z.number().int().min(0).openapi({ description: '知识下载数', example: 15 }),
|
|
|
+ knowledgeLikeCount: z.number().int().min(0).openapi({ description: '知识点赞数', example: 25 }),
|
|
|
+ knowledgeReadCount: z.number().int().min(0).openapi({ description: '知识阅读数', example: 100 }),
|
|
|
+ knowledgeFavoriteCount: z.number().int().min(0).openapi({ description: '知识收藏数', example: 8 }),
|
|
|
+ knowledgeCommentCount: z.number().int().min(0).openapi({ description: '知识评论数', example: 5 }),
|
|
|
+ knowledgeRanking: z.number().int().min(0).openapi({ description: '知识排名', example: 1 }),
|
|
|
+ knowledgeRankingScore: z.coerce.number().openapi({ description: '知识排名分数', example: 95.5 }),
|
|
|
+ createdAt: z.date().openapi({ description: '创建时间', example: '2024-01-01T00:00:00Z' }),
|
|
|
+ updatedAt: z.date().openapi({ description: '更新时间', example: '2024-01-01T00:00:00Z' }),
|
|
|
+ createdBy: z.number().int().positive().nullable().optional().openapi({ description: '创建人ID', example: 1 }),
|
|
|
+ updatedBy: z.number().int().positive().nullable().optional().openapi({ description: '更新人ID', example: 1 })
|
|
|
});
|