|
@@ -18,23 +18,23 @@ export const SalaryLevelSchema = z.object({
|
|
|
description: '区县ID',
|
|
description: '区县ID',
|
|
|
example: 110101
|
|
example: 110101
|
|
|
}),
|
|
}),
|
|
|
- basicSalary: z.coerce.number().positive().openapi({
|
|
|
|
|
|
|
+ basicSalary: z.coerce.number<number>().positive().openapi({
|
|
|
description: '基本工资',
|
|
description: '基本工资',
|
|
|
example: 5000.00
|
|
example: 5000.00
|
|
|
}),
|
|
}),
|
|
|
- allowance: z.coerce.number().min(0).default(0).openapi({
|
|
|
|
|
|
|
+ allowance: z.coerce.number<number>().min(0).default(0).openapi({
|
|
|
description: '津贴补贴',
|
|
description: '津贴补贴',
|
|
|
example: 1000.00
|
|
example: 1000.00
|
|
|
}),
|
|
}),
|
|
|
- insurance: z.coerce.number().min(0).default(0).openapi({
|
|
|
|
|
|
|
+ insurance: z.coerce.number<number>().min(0).default(0).openapi({
|
|
|
description: '保险费用',
|
|
description: '保险费用',
|
|
|
example: 500.00
|
|
example: 500.00
|
|
|
}),
|
|
}),
|
|
|
- housingFund: z.coerce.number().min(0).default(0).openapi({
|
|
|
|
|
|
|
+ housingFund: z.coerce.number<number>().min(0).default(0).openapi({
|
|
|
description: '住房公积金',
|
|
description: '住房公积金',
|
|
|
example: 800.00
|
|
example: 800.00
|
|
|
}),
|
|
}),
|
|
|
- totalSalary: z.coerce.number().positive().openapi({
|
|
|
|
|
|
|
+ totalSalary: z.coerce.number<number>().positive().openapi({
|
|
|
description: '总薪资',
|
|
description: '总薪资',
|
|
|
example: 7300.00
|
|
example: 7300.00
|
|
|
}),
|
|
}),
|
|
@@ -65,31 +65,31 @@ export const SalaryLevelSchema = z.object({
|
|
|
|
|
|
|
|
// 创建薪资DTO
|
|
// 创建薪资DTO
|
|
|
export const CreateSalarySchema = z.object({
|
|
export const CreateSalarySchema = z.object({
|
|
|
- provinceId: z.coerce.number().int().positive().openapi({
|
|
|
|
|
|
|
+ provinceId: z.coerce.number<number>().int().positive().openapi({
|
|
|
description: '省份ID',
|
|
description: '省份ID',
|
|
|
example: 110000
|
|
example: 110000
|
|
|
}),
|
|
}),
|
|
|
- cityId: z.coerce.number().int().positive().openapi({
|
|
|
|
|
|
|
+ cityId: z.coerce.number<number>().int().positive().openapi({
|
|
|
description: '城市ID',
|
|
description: '城市ID',
|
|
|
example: 110100
|
|
example: 110100
|
|
|
}),
|
|
}),
|
|
|
- districtId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ districtId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '区县ID',
|
|
description: '区县ID',
|
|
|
example: 110101
|
|
example: 110101
|
|
|
}),
|
|
}),
|
|
|
- basicSalary: z.coerce.number().positive().openapi({
|
|
|
|
|
|
|
+ basicSalary: z.coerce.number<number>().positive().openapi({
|
|
|
description: '基本工资',
|
|
description: '基本工资',
|
|
|
example: 5000.00
|
|
example: 5000.00
|
|
|
}),
|
|
}),
|
|
|
- allowance: z.coerce.number().min(0).nullable().optional().openapi({
|
|
|
|
|
|
|
+ allowance: z.coerce.number<number>().min(0).nullable().optional().openapi({
|
|
|
description: '津贴补贴',
|
|
description: '津贴补贴',
|
|
|
example: 1000.00
|
|
example: 1000.00
|
|
|
}),
|
|
}),
|
|
|
- insurance: z.coerce.number().min(0).nullable().optional().openapi({
|
|
|
|
|
|
|
+ insurance: z.coerce.number<number>().min(0).nullable().optional().openapi({
|
|
|
description: '保险费用',
|
|
description: '保险费用',
|
|
|
example: 500.00
|
|
example: 500.00
|
|
|
}),
|
|
}),
|
|
|
- housingFund: z.coerce.number().min(0).nullable().optional().openapi({
|
|
|
|
|
|
|
+ housingFund: z.coerce.number<number>().min(0).nullable().optional().openapi({
|
|
|
description: '住房公积金',
|
|
description: '住房公积金',
|
|
|
example: 800.00
|
|
example: 800.00
|
|
|
})
|
|
})
|
|
@@ -97,35 +97,35 @@ export const CreateSalarySchema = z.object({
|
|
|
|
|
|
|
|
// 更新薪资DTO
|
|
// 更新薪资DTO
|
|
|
export const UpdateSalarySchema = z.object({
|
|
export const UpdateSalarySchema = z.object({
|
|
|
- id: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ id: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '薪资ID',
|
|
description: '薪资ID',
|
|
|
example: 1
|
|
example: 1
|
|
|
}),
|
|
}),
|
|
|
- provinceId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ provinceId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '省份ID',
|
|
description: '省份ID',
|
|
|
example: 110000
|
|
example: 110000
|
|
|
}),
|
|
}),
|
|
|
- cityId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ cityId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '城市ID',
|
|
description: '城市ID',
|
|
|
example: 110100
|
|
example: 110100
|
|
|
}),
|
|
}),
|
|
|
- districtId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ districtId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '区县ID',
|
|
description: '区县ID',
|
|
|
example: 110101
|
|
example: 110101
|
|
|
}),
|
|
}),
|
|
|
- basicSalary: z.coerce.number().positive().optional().openapi({
|
|
|
|
|
|
|
+ basicSalary: z.coerce.number<number>().positive().optional().openapi({
|
|
|
description: '基本工资',
|
|
description: '基本工资',
|
|
|
example: 5000.00
|
|
example: 5000.00
|
|
|
}),
|
|
}),
|
|
|
- allowance: z.coerce.number().min(0).optional().openapi({
|
|
|
|
|
|
|
+ allowance: z.coerce.number<number>().min(0).optional().openapi({
|
|
|
description: '津贴补贴',
|
|
description: '津贴补贴',
|
|
|
example: 1000.00
|
|
example: 1000.00
|
|
|
}),
|
|
}),
|
|
|
- insurance: z.coerce.number().min(0).optional().openapi({
|
|
|
|
|
|
|
+ insurance: z.coerce.number<number>().min(0).optional().openapi({
|
|
|
description: '保险费用',
|
|
description: '保险费用',
|
|
|
example: 500.00
|
|
example: 500.00
|
|
|
}),
|
|
}),
|
|
|
- housingFund: z.coerce.number().min(0).optional().openapi({
|
|
|
|
|
|
|
+ housingFund: z.coerce.number<number>().min(0).optional().openapi({
|
|
|
description: '住房公积金',
|
|
description: '住房公积金',
|
|
|
example: 800.00
|
|
example: 800.00
|
|
|
})
|
|
})
|
|
@@ -133,23 +133,23 @@ export const UpdateSalarySchema = z.object({
|
|
|
|
|
|
|
|
// 查询薪资DTO
|
|
// 查询薪资DTO
|
|
|
export const QuerySalarySchema = z.object({
|
|
export const QuerySalarySchema = z.object({
|
|
|
- provinceId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ provinceId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '省份ID',
|
|
description: '省份ID',
|
|
|
example: 110000
|
|
example: 110000
|
|
|
}),
|
|
}),
|
|
|
- cityId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ cityId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '城市ID',
|
|
description: '城市ID',
|
|
|
example: 110100
|
|
example: 110100
|
|
|
}),
|
|
}),
|
|
|
- districtId: z.coerce.number().int().positive().optional().openapi({
|
|
|
|
|
|
|
+ districtId: z.coerce.number<number>().int().positive().optional().openapi({
|
|
|
description: '区县ID',
|
|
description: '区县ID',
|
|
|
example: 110101
|
|
example: 110101
|
|
|
}),
|
|
}),
|
|
|
- skip: z.coerce.number().int().min(0).default(0).optional().openapi({
|
|
|
|
|
|
|
+ skip: z.coerce.number<number>().int().min(0).default(0).optional().openapi({
|
|
|
description: '跳过记录数',
|
|
description: '跳过记录数',
|
|
|
example: 0
|
|
example: 0
|
|
|
}),
|
|
}),
|
|
|
- take: z.coerce.number().int().min(1).max(100).default(10).optional().openapi({
|
|
|
|
|
|
|
+ take: z.coerce.number<number>().int().min(1).max(100).default(10).optional().openapi({
|
|
|
description: '获取记录数',
|
|
description: '获取记录数',
|
|
|
example: 10
|
|
example: 10
|
|
|
})
|
|
})
|
|
@@ -157,11 +157,11 @@ export const QuerySalarySchema = z.object({
|
|
|
|
|
|
|
|
// 按省份城市查询DTO
|
|
// 按省份城市查询DTO
|
|
|
export const GetSalaryByProvinceCitySchema = z.object({
|
|
export const GetSalaryByProvinceCitySchema = z.object({
|
|
|
- provinceId: z.coerce.number().int().positive().openapi({
|
|
|
|
|
|
|
+ provinceId: z.coerce.number<number>().int().positive().openapi({
|
|
|
description: '省份ID',
|
|
description: '省份ID',
|
|
|
example: 110000
|
|
example: 110000
|
|
|
}),
|
|
}),
|
|
|
- cityId: z.coerce.number().int().positive().openapi({
|
|
|
|
|
|
|
+ cityId: z.coerce.number<number>().int().positive().openapi({
|
|
|
description: '城市ID',
|
|
description: '城市ID',
|
|
|
example: 110100
|
|
example: 110100
|
|
|
})
|
|
})
|