完善项目

This commit is contained in:
xuqiuyun
2025-09-28 17:58:43 +08:00
parent ec3f472641
commit 5b615473e0
59 changed files with 5428 additions and 593 deletions

View File

@@ -214,6 +214,84 @@ const swaggerDefinition = {
updated_at: { type: 'string', format: 'date-time', description: '更新时间' }
}
},
InsuranceType: {
type: 'object',
properties: {
id: { type: 'integer', description: '险种ID' },
name: { type: 'string', description: '险种名称' },
description: { type: 'string', description: '险种描述' },
applicable_livestock: { type: 'string', description: '适用牲畜类型' },
insurance_term: { type: 'integer', description: '保险期限(月)' },
policy_form: { type: 'string', description: '保单形式' },
coverage_amount_min: { type: 'number', format: 'decimal', description: '最低保额' },
coverage_amount_max: { type: 'number', format: 'decimal', description: '最高保额' },
premium_rate: { type: 'number', format: 'decimal', description: '保险费率' },
service_area: { type: 'string', description: '服务区域' },
add_time: { type: 'string', format: 'date-time', description: '添加时间' },
on_sale_status: { type: 'boolean', description: '在售状态' },
sort_order: { type: 'integer', description: '排序顺序' },
remarks: { type: 'string', description: '备注' },
status: { type: 'string', enum: ['active', 'inactive'], description: '险种状态' },
created_by: { type: 'integer', description: '创建人ID' },
updated_by: { type: 'integer', description: '更新人ID' },
created_at: { type: 'string', format: 'date-time', description: '创建时间' },
updated_at: { type: 'string', format: 'date-time', description: '更新时间' }
}
},
CreateInsuranceTypeRequest: {
type: 'object',
required: ['name', 'coverage_amount_min', 'coverage_amount_max', 'premium_rate'],
properties: {
name: { type: 'string', description: '险种名称', minLength: 1, maxLength: 100 },
description: { type: 'string', description: '险种描述' },
applicable_livestock: { type: 'string', description: '适用牲畜类型', maxLength: 100 },
insurance_term: { type: 'integer', description: '保险期限(月)', minimum: 1 },
policy_form: { type: 'string', description: '保单形式', maxLength: 50 },
coverage_amount_min: { type: 'number', format: 'decimal', description: '最低保额', minimum: 0 },
coverage_amount_max: { type: 'number', format: 'decimal', description: '最高保额', minimum: 0 },
premium_rate: { type: 'number', format: 'decimal', description: '保险费率', minimum: 0, maximum: 1 },
service_area: { type: 'string', description: '服务区域' },
add_time: { type: 'string', format: 'date-time', description: '添加时间' },
on_sale_status: { type: 'boolean', description: '在售状态', default: true },
sort_order: { type: 'integer', description: '排序顺序', default: 0 },
remarks: { type: 'string', description: '备注' },
status: { type: 'string', enum: ['active', 'inactive'], description: '险种状态', default: 'active' }
}
},
UpdateInsuranceTypeRequest: {
type: 'object',
properties: {
name: { type: 'string', description: '险种名称', minLength: 1, maxLength: 100 },
description: { type: 'string', description: '险种描述' },
applicable_livestock: { type: 'string', description: '适用牲畜类型', maxLength: 100 },
insurance_term: { type: 'integer', description: '保险期限(月)', minimum: 1 },
policy_form: { type: 'string', description: '保单形式', maxLength: 50 },
coverage_amount_min: { type: 'number', format: 'decimal', description: '最低保额', minimum: 0 },
coverage_amount_max: { type: 'number', format: 'decimal', description: '最高保额', minimum: 0 },
premium_rate: { type: 'number', format: 'decimal', description: '保险费率', minimum: 0, maximum: 1 },
service_area: { type: 'string', description: '服务区域' },
add_time: { type: 'string', format: 'date-time', description: '添加时间' },
on_sale_status: { type: 'boolean', description: '在售状态' },
sort_order: { type: 'integer', description: '排序顺序' },
remarks: { type: 'string', description: '备注' },
status: { type: 'string', enum: ['active', 'inactive'], description: '险种状态' }
}
},
UpdateInsuranceTypeStatusRequest: {
type: 'object',
properties: {
status: { type: 'string', enum: ['active', 'inactive'], description: '险种状态' },
on_sale_status: { type: 'boolean', description: '在售状态' }
}
},
Pagination: {
type: 'object',
properties: {
page: { type: 'integer', description: '当前页码' },
limit: { type: 'integer', description: '每页数量' },
total: { type: 'integer', description: '总记录数' }
}
},
Error: {
type: 'object',
properties: {
@@ -293,6 +371,7 @@ const swaggerDefinition = {
tags: [
{ name: '认证', description: '用户认证相关接口' },
{ name: '用户管理', description: '用户管理相关接口' },
{ name: '险种管理', description: '保险险种管理相关接口' },
{ name: '保险申请', description: '保险申请管理相关接口' },
{ name: '保单管理', description: '保单管理相关接口' },
{ name: '理赔管理', description: '理赔管理相关接口' },