Files
geMoldInsight/openapi.json
T
cjw e728dcd226 批次4后续专项完成:D11清偿 + OCC方案B实施 + 部署参数 + D2诚实标注 + CI门禁
① D11 HTML 报告 RustFS 单源化(TECH_DEBT P2 清偿):可视化产物写任务临时目录后
   裸传报告键 html/reports/{filename}(文件名寻址),/html StaticFiles 挂载删除,
   新增 html_report_router 根路径代理(报告键→遗留 JSON 包装→本地卷兜底→404,
   防穿越);URL 形状 /html/{filename} 不变,持久化引用零迁移;celery 摘除
   html_data 卷,镜像不再烤入陈旧报告;顺带删除 get_stp_file_with_data 死数据块
② OCC 方案 B(D10 清偿):run_occ(op_name, payload) 契约 + 常驻工作进程池
   (occ_process_pool + occ_worker 操作注册表),超时/崩溃 terminate 换新补位、
   任务级超时 recover 整体重建,残留线程泄漏根治;TopoDS 不跨进程(generate_cavity
   分模 + 方案 STEP 持久化全在子进程内,返回 export_manifest);删除内存形状缓存链、
   CADExporter.export_mold_results、shape_loader(→ stp_materializer)
③ OCC 方案 A 部署参数:CELERY_CONCURRENCY / CELERY_MAX_TASKS_PER_CHILD 进
   Dockerfile.celery + compose + .env.example
④ D2 诚实标注:铝价响应带 source: "simulated",前端按来源渲染标注(原硬编码
   "上海期货交易所"属虚假声明),死代码 getAluminumPrice 删除
⑤ CI 门禁:.gitea/workflows/ci.yml 三 job(pytest / 前端构建含 vue-tsc /
   openapi 漂移检测)

接口变更三件套随批完成(openapi 76→77 paths + gen:api + 前端构建通过;方案 B
接口面零变化)。测试基线 143 passed, 0 skipped(新增 16 项)。文档六处同步。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-18 17:22:01 +08:00

10333 lines
255 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"openapi": "3.1.0",
"info": {
"title": "Gemold - Unified Backend",
"version": "4.0.0"
},
"paths": {
"/api/auth/login": {
"post": {
"tags": [
"认证"
],
"summary": "Login",
"operationId": "login_api_auth_login_post",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/Body_login_api_auth_login_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/login/json": {
"post": {
"tags": [
"认证"
],
"summary": "Login Json",
"operationId": "login_json_api_auth_login_json_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/me": {
"get": {
"tags": [
"认证"
],
"summary": "Get Current User Info",
"operationId": "get_current_user_info_api_auth_me_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserResponse"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/auth/logout": {
"post": {
"tags": [
"认证"
],
"summary": "Logout",
"operationId": "logout_api_auth_logout_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/auth/users": {
"get": {
"tags": [
"认证"
],
"summary": "List Users",
"operationId": "list_users_api_auth_users_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/UserResponse"
},
"type": "array",
"title": "Response List Users Api Auth Users Get"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"tags": [
"认证"
],
"summary": "Create User",
"operationId": "create_user_api_auth_users_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserCreate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/auth/users/{user_id}": {
"put": {
"tags": [
"认证"
],
"summary": "Update User",
"operationId": "update_user_api_auth_users__user_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "user_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "User Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserUpdate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"认证"
],
"summary": "Delete User",
"operationId": "delete_user_api_auth_users__user_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "user_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "User Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/users/{user_id}/reset-password": {
"put": {
"tags": [
"认证"
],
"summary": "Reset User Password",
"operationId": "reset_user_password_api_auth_users__user_id__reset_password_put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "user_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "User Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResetPasswordRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/roles": {
"get": {
"tags": [
"认证"
],
"summary": "List Roles",
"operationId": "list_roles_api_auth_roles_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/RoleResponse"
},
"type": "array",
"title": "Response List Roles Api Auth Roles Get"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"tags": [
"认证"
],
"summary": "Create Role",
"operationId": "create_role_api_auth_roles_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoleCreate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoleResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/auth/roles/{role_id}": {
"put": {
"tags": [
"认证"
],
"summary": "Update Role",
"operationId": "update_role_api_auth_roles__role_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "role_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Role Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoleCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoleResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"认证"
],
"summary": "Delete Role",
"operationId": "delete_role_api_auth_roles__role_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "role_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Role Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/roles/{role_id}/permissions": {
"put": {
"tags": [
"认证"
],
"summary": "Set Role Permissions",
"operationId": "set_role_permissions_api_auth_roles__role_id__permissions_put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "role_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Role Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "integer"
},
"title": "Permission Ids"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/auth/permissions": {
"get": {
"tags": [
"认证"
],
"summary": "List Permissions",
"operationId": "list_permissions_api_auth_permissions_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/PermissionResponse"
},
"type": "array",
"title": "Response List Permissions Api Auth Permissions Get"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"tags": [
"认证"
],
"summary": "Create Permission",
"operationId": "create_permission_api_auth_permissions_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PermissionCreate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PermissionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/auth/permissions/{permission_id}": {
"delete": {
"tags": [
"认证"
],
"summary": "Delete Permission",
"operationId": "delete_permission_api_auth_permissions__permission_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "permission_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Permission Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/health": {
"get": {
"summary": "Health",
"operationId": "health_api_health_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
},
"post": {
"summary": "Health",
"operationId": "health_api_health_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/upload": {
"post": {
"summary": "Upload Stp",
"description": "上传STP文件并存储到数据库",
"operationId": "upload_stp_api_upload_post",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_upload_stp_api_upload_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/batch-upload": {
"post": {
"summary": "Batch Upload",
"description": "批量上传多个 STP 文件,每个文件创建独立分析任务,用 batch_id 聚合。",
"operationId": "batch_upload_api_batch_upload_post",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_batch_upload_api_batch_upload_post"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/batch/{batch_id}": {
"get": {
"summary": "Get Batch Status",
"description": "聚合查询批量任务进度(D7:以 PG 为单一事实源,按 batch_id 聚合;Redis 仅热缓存)",
"operationId": "get_batch_status_api_batch__batch_id__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "batch_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Batch Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/status/{task_id}": {
"post": {
"summary": "Get Status",
"description": "获取任务状态(需登录,且仅任务所有者可访问)\n\n优先返回内存中的任务信息;\n如果内存中不存在,则从 PostgreSQL + RustFS 组装一个持久化的任务视图,\n结构与内存任务保持尽量一致,便于前端集中展示总结性信息。",
"operationId": "get_status_api_status__task_id__post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Task Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"summary": "Get Status",
"description": "获取任务状态(需登录,且仅任务所有者可访问)\n\n优先返回内存中的任务信息;\n如果内存中不存在,则从 PostgreSQL + RustFS 组装一个持久化的任务视图,\n结构与内存任务保持尽量一致,便于前端集中展示总结性信息。",
"operationId": "get_status_api_status__task_id__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Task Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/history": {
"get": {
"summary": "Get File History",
"description": "获取当前用户按文件名分组的文件历史记录(支持多上传)",
"operationId": "get_file_history_api_history_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"summary": "Get File History",
"description": "获取当前用户按文件名分组的文件历史记录(支持多上传)",
"operationId": "get_file_history_api_history_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/history/{filename}": {
"post": {
"summary": "Get File Records",
"description": "获取当前用户指定文件名的所有上传记录(支持多上传历史)",
"operationId": "get_file_records_api_history__filename__post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "filename",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Filename"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"summary": "Get File Records",
"description": "获取当前用户指定文件名的所有上传记录(支持多上传历史)",
"operationId": "get_file_records_api_history__filename__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "filename",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Filename"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/cam/plan": {
"post": {
"summary": "Generate Cam Plan",
"description": "基于任务分模结果生成 CAM 准备包(MVP)。",
"operationId": "generate_cam_plan_api_cam_plan_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CamPlanRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/optimize-layout": {
"post": {
"summary": "Optimize Cavity Layout",
"operationId": "optimize_cavity_layout_api_optimize_layout_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OptimizeLayoutRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/design-cooling": {
"post": {
"summary": "Design Cooling System",
"operationId": "design_cooling_system_api_design_cooling_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CoolingDesignRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/design-gating": {
"post": {
"summary": "Design Gating System",
"operationId": "design_gating_system_api_design_gating_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GatingDesignRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/design-mold-system": {
"post": {
"summary": "Design Complete Mold System",
"operationId": "design_complete_mold_system_api_design_mold_system_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MoldSystemDesignRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/detect-undercuts": {
"post": {
"summary": "Detect Undercuts",
"operationId": "detect_undercuts_api_detect_undercuts_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UndercutDetectRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/cost-estimate": {
"post": {
"summary": "Estimate Cost",
"description": "模具成本估算:优先使用 LLM,未启用时降级为规则式估算",
"operationId": "estimate_cost_api_cost_estimate_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CostEstimateRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/design-cam": {
"post": {
"summary": "Design Mold Cam",
"operationId": "design_mold_cam_api_design_cam_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CamDesignRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/check-collision": {
"post": {
"summary": "Check Toolpath Collision",
"operationId": "check_toolpath_collision_api_check_collision_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CollisionCheckRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/optimize-toolpath": {
"post": {
"summary": "Optimize Toolpath",
"operationId": "optimize_toolpath_api_optimize_toolpath_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ToolpathOptimizeRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/design-electrodes": {
"post": {
"summary": "Design Edm Electrodes",
"operationId": "design_edm_electrodes_api_design_electrodes_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ElectrodeDesignRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/simulate-machining": {
"post": {
"summary": "Simulate Machining",
"operationId": "simulate_machining_api_simulate_machining_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MachiningSimulateRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/export-mold": {
"post": {
"summary": "Export Mold Results",
"operationId": "export_mold_results_api_export_mold_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExportMoldRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/export-download/{filepath}": {
"get": {
"summary": "Download Export File",
"operationId": "download_export_file_api_export_download__filepath__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "filepath",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Filepath"
}
},
{
"name": "task_id",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Task Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/export-recommendations": {
"get": {
"summary": "Get Export Recommendations",
"operationId": "get_export_recommendations_api_export_recommendations_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "target",
"in": "query",
"required": false,
"schema": {
"type": "string",
"default": "ug",
"title": "Target"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/aluminum-price/current": {
"get": {
"tags": [
"铝金属价格"
],
"summary": "Aluminum Current Price",
"operationId": "aluminum_current_price_api_aluminum_price_current_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/api/aluminum-price/history": {
"get": {
"tags": [
"铝金属价格"
],
"summary": "Aluminum Price History",
"operationId": "aluminum_price_history_api_aluminum_price_history_get",
"parameters": [
{
"name": "days",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 365,
"minimum": 7,
"default": 30,
"title": "Days"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/html/{filename}": {
"get": {
"summary": "读取 HTML 可视化报告",
"operationId": "get_html_report_html__filename__get",
"parameters": [
{
"name": "filename",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Filename"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/products": {
"get": {
"tags": [
"进销存",
"产品管理"
],
"summary": "List Products",
"operationId": "list_products_api_products_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
},
{
"name": "search",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search"
}
},
{
"name": "category",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category"
}
},
{
"name": "item_type",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Item Type"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductResponse"
},
"title": "Response List Products Api Products Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"进销存",
"产品管理"
],
"summary": "Create Product",
"operationId": "create_product_api_products_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/products/from-task/{task_id}": {
"post": {
"tags": [
"进销存",
"产品管理"
],
"summary": "Create Product From Task",
"description": "从模具分析任务创建进销存成品,回写 stp_files.product_id(P2-1)",
"operationId": "create_product_from_task_api_products_from_task__task_id__post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Task Id"
}
}
],
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/products/{product_id}": {
"put": {
"tags": [
"进销存",
"产品管理"
],
"summary": "Update Product",
"operationId": "update_product_api_products__product_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"进销存",
"产品管理"
],
"summary": "Delete Product",
"operationId": "delete_product_api_products__product_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/products/{product_id}/materials": {
"get": {
"tags": [
"进销存",
"产品管理"
],
"summary": "Get Product Bom",
"operationId": "get_product_bom_api_products__product_id__materials_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductBOMResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"进销存",
"产品管理"
],
"summary": "Replace Product Bom",
"operationId": "replace_product_bom_api_products__product_id__materials_put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductBOMUpdate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProductBOMResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/suppliers": {
"get": {
"tags": [
"进销存",
"供应商管理"
],
"summary": "List Suppliers",
"operationId": "list_suppliers_api_suppliers_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
},
{
"name": "search",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SupplierResponse"
},
"title": "Response List Suppliers Api Suppliers Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"进销存",
"供应商管理"
],
"summary": "Create Supplier",
"operationId": "create_supplier_api_suppliers_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SupplierCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SupplierResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/suppliers/{supplier_id}": {
"put": {
"tags": [
"进销存",
"供应商管理"
],
"summary": "Update Supplier",
"operationId": "update_supplier_api_suppliers__supplier_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "supplier_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Supplier Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SupplierCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SupplierResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"进销存",
"供应商管理"
],
"summary": "Delete Supplier",
"operationId": "delete_supplier_api_suppliers__supplier_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "supplier_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Supplier Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/customers": {
"get": {
"tags": [
"进销存",
"客户管理"
],
"summary": "List Customers",
"operationId": "list_customers_api_customers_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
},
{
"name": "search",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Search"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomerResponse"
},
"title": "Response List Customers Api Customers Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"进销存",
"客户管理"
],
"summary": "Create Customer",
"operationId": "create_customer_api_customers_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/customers/{customer_id}": {
"put": {
"tags": [
"进销存",
"客户管理"
],
"summary": "Update Customer",
"operationId": "update_customer_api_customers__customer_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "customer_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Customer Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"进销存",
"客户管理"
],
"summary": "Delete Customer",
"operationId": "delete_customer_api_customers__customer_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "customer_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Customer Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/warehouses": {
"get": {
"tags": [
"进销存",
"仓库管理"
],
"summary": "List Warehouses",
"operationId": "list_warehouses_api_warehouses_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/WarehouseResponse"
},
"type": "array",
"title": "Response List Warehouses Api Warehouses Get"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"tags": [
"进销存",
"仓库管理"
],
"summary": "Create Warehouse",
"operationId": "create_warehouse_api_warehouses_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WarehouseCreate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WarehouseResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/inventory": {
"get": {
"tags": [
"进销存",
"库存管理"
],
"summary": "List Inventory",
"operationId": "list_inventory_api_inventory_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "warehouse_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Warehouse Id"
}
},
{
"name": "product_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Product Id"
}
},
{
"name": "low_stock",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false,
"title": "Low Stock"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResponse_InventoryResponse_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"进销存",
"库存管理"
],
"summary": "Create Inventory",
"operationId": "create_inventory_api_inventory_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InventoryCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InventoryResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/inventory/{inventory_id}": {
"put": {
"tags": [
"进销存",
"库存管理"
],
"summary": "Update Inventory",
"operationId": "update_inventory_api_inventory__inventory_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "inventory_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Inventory Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InventoryUpdate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InventoryResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"进销存",
"库存管理"
],
"summary": "Delete Inventory",
"operationId": "delete_inventory_api_inventory__inventory_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "inventory_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Inventory Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/stock-movements": {
"post": {
"tags": [
"进销存",
"库存变动"
],
"summary": "Create Stock Movement",
"operationId": "create_stock_movement_api_stock_movements_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StockMovementCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StockMovementResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"进销存",
"库存变动"
],
"summary": "List Stock Movements",
"operationId": "list_stock_movements_api_stock_movements_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Product Id"
}
},
{
"name": "movement_type",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Movement Type"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResponse_StockMovementResponse_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/purchase-orders": {
"get": {
"tags": [
"进销存",
"采购订单"
],
"summary": "List Purchase Orders",
"operationId": "list_purchase_orders_api_purchase_orders_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResponse_PurchaseOrderResponse_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"进销存",
"采购订单"
],
"summary": "Create Purchase Order",
"operationId": "create_purchase_order_api_purchase_orders_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/purchase-orders/{order_id}": {
"get": {
"tags": [
"进销存",
"采购订单"
],
"summary": "Get Purchase Order Detail",
"operationId": "get_purchase_order_detail_api_purchase_orders__order_id__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderDetailResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"进销存",
"采购订单"
],
"summary": "Update Purchase Order",
"operationId": "update_purchase_order_api_purchase_orders__order_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"进销存",
"采购订单"
],
"summary": "Delete Purchase Order",
"operationId": "delete_purchase_order_api_purchase_orders__order_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/purchase-orders/{order_id}/status": {
"patch": {
"tags": [
"进销存",
"采购订单"
],
"summary": "Update Purchase Order Status",
"operationId": "update_purchase_order_status_api_purchase_orders__order_id__status_patch",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"title": "Status"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/purchase-orders/{order_id}/receive": {
"post": {
"tags": [
"进销存",
"采购订单"
],
"summary": "Receive Purchase Order",
"operationId": "receive_purchase_order_api_purchase_orders__order_id__receive_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderReceiveRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseOrderDetailResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/sales-orders": {
"get": {
"tags": [
"进销存",
"销售订单"
],
"summary": "List Sales Orders",
"operationId": "list_sales_orders_api_sales_orders_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResponse_SalesOrderResponse_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Create Sales Order",
"operationId": "create_sales_order_api_sales_orders_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/sales-orders/{order_id}": {
"get": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Get Sales Order Detail",
"operationId": "get_sales_order_detail_api_sales_orders__order_id__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderDetailResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Update Sales Order",
"operationId": "update_sales_order_api_sales_orders__order_id__put",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Delete Sales Order",
"operationId": "delete_sales_order_api_sales_orders__order_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/sales-orders/{order_id}/status": {
"patch": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Update Sales Order Status",
"operationId": "update_sales_order_status_api_sales_orders__order_id__status_patch",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderStatusUpdate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/sales-orders/{order_id}/consume-materials": {
"post": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Consume Materials",
"description": "记录销售订单的物料消耗(在已发料基础上记录额外消耗,如报废/超耗)",
"operationId": "consume_materials_api_sales_orders__order_id__consume_materials_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaterialConsumptionRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/sales-orders/{order_id}/production-plan": {
"get": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Get Sales Order Production Plan",
"operationId": "get_sales_order_production_plan_api_sales_orders__order_id__production_plan_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderProductionPlanResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/sales-orders/{order_id}/issue-materials": {
"post": {
"tags": [
"进销存",
"销售订单"
],
"summary": "Issue Sales Order Materials",
"operationId": "issue_sales_order_materials_api_sales_orders__order_id__issue_materials_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "order_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Order Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderIssueRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SalesOrderIssueResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/materials/{product_id}/price-history": {
"post": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Add Material Price History",
"operationId": "add_material_price_history_api_materials__product_id__price_history_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaterialPriceHistoryCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaterialPriceHistoryResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Get Material Price History",
"operationId": "get_material_price_history_api_materials__product_id__price_history_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MaterialPriceHistoryResponse"
},
"title": "Response Get Material Price History Api Materials Product Id Price History Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/materials/{product_id}/price-trend": {
"get": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Get Material Price Trend",
"operationId": "get_material_price_trend_api_materials__product_id__price_trend_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
},
{
"name": "months",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 24,
"minimum": 1,
"default": 6,
"title": "Months"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaterialPriceTrendResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/materials/{product_id}/suppliers": {
"post": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Add Material Supplier",
"operationId": "add_material_supplier_api_materials__product_id__suppliers_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaterialSupplierCreate"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MaterialSupplierResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Get Material Suppliers",
"operationId": "get_material_suppliers_api_materials__product_id__suppliers_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "product_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Product Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MaterialSupplierResponse"
},
"title": "Response Get Material Suppliers Api Materials Product Id Suppliers Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/materials/suppliers/{supplier_id}": {
"delete": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Remove Material Supplier",
"operationId": "remove_material_supplier_api_materials_suppliers__supplier_id__delete",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "supplier_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Supplier Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/materials/suppliers/{supplier_id}/materials": {
"get": {
"tags": [
"进销存",
"物料管理"
],
"summary": "Get Supplier Materials",
"operationId": "get_supplier_materials_api_materials_suppliers__supplier_id__materials_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "supplier_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Supplier Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MaterialSupplierResponse"
},
"title": "Response Get Supplier Materials Api Materials Suppliers Supplier Id Materials Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/purchase-demands/calculate": {
"post": {
"tags": [
"进销存",
"采购需求推导"
],
"summary": "Calculate Purchase Demands",
"description": "根据销售订单 ID 列表,自动推导采购需求(BOM 展开 → 库存对比 → 供应商推荐)",
"operationId": "calculate_purchase_demands_api_purchase_demands_calculate_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseDemandCalculateRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseDemandResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/purchase-demands/convert": {
"post": {
"tags": [
"进销存",
"采购需求推导"
],
"summary": "Convert Purchase Demands",
"description": "将采购需求一键转换为采购单(按供应商分组,每组生成一张草稿采购单)",
"operationId": "convert_purchase_demands_api_purchase_demands_convert_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseDemandConvertRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PurchaseDemandConvertResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/dashboard": {
"get": {
"tags": [
"进销存",
"仪表盘"
],
"summary": "Get Dashboard",
"operationId": "get_dashboard_api_dashboard_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/finance/receipts": {
"post": {
"tags": [
"进销存",
"财务管理"
],
"summary": "Create Receipt",
"operationId": "create_receipt_api_finance_receipts_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReceiptCreate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FinanceTransactionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/finance/payments": {
"post": {
"tags": [
"进销存",
"财务管理"
],
"summary": "Create Payment",
"operationId": "create_payment_api_finance_payments_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentCreate"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FinanceTransactionResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/finance/transactions": {
"get": {
"tags": [
"进销存",
"财务管理"
],
"summary": "List Transactions",
"operationId": "list_transactions_api_finance_transactions_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "txn_type",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Txn Type"
}
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": "confirmed",
"title": "Status"
}
},
{
"name": "year",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 2100,
"minimum": 2000
},
{
"type": "null"
}
],
"title": "Year"
}
},
{
"name": "quarter",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 4,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Quarter"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 20,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaginatedResponse_FinanceTransactionResponse_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/finance/transactions/{transaction_id}/void": {
"post": {
"tags": [
"进销存",
"财务管理"
],
"summary": "Void Transaction",
"operationId": "void_transaction_api_finance_transactions__transaction_id__void_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "transaction_id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"title": "Transaction Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/finance/receivables": {
"get": {
"tags": [
"进销存",
"财务管理"
],
"summary": "List Receivables",
"operationId": "list_receivables_api_finance_receivables_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "year",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 2100,
"minimum": 2000
},
{
"type": "null"
}
],
"title": "Year"
}
},
{
"name": "quarter",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 4,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Quarter"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 200,
"minimum": 1,
"default": 50,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReceivableItemResponse"
},
"title": "Response List Receivables Api Finance Receivables Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/finance/payables": {
"get": {
"tags": [
"进销存",
"财务管理"
],
"summary": "List Payables",
"operationId": "list_payables_api_finance_payables_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "year",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 2100,
"minimum": 2000
},
{
"type": "null"
}
],
"title": "Year"
}
},
{
"name": "quarter",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 4,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Quarter"
}
},
{
"name": "skip",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"default": 0,
"title": "Skip"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 200,
"minimum": 1,
"default": 50,
"title": "Limit"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PayableItemResponse"
},
"title": "Response List Payables Api Finance Payables Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/finance/summary": {
"get": {
"tags": [
"进销存",
"财务管理"
],
"summary": "Get Finance Summary",
"operationId": "get_finance_summary_api_finance_summary_get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "year",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 2100,
"minimum": 2000
},
{
"type": "null"
}
],
"title": "Year"
}
},
{
"name": "quarter",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 4,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Quarter"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FinanceSummaryResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/finance/partner-statement/{partner_type}": {
"get": {
"tags": [
"进销存",
"财务管理"
],
"summary": "Get Partner Statement",
"operationId": "get_partner_statement_api_finance_partner_statement__partner_type__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "partner_type",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Partner Type"
}
},
{
"name": "year",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 2100,
"minimum": 2000
},
{
"type": "null"
}
],
"title": "Year"
}
},
{
"name": "quarter",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 4,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Quarter"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FinancePartnerStatementResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/finance/partner-product-statement/{partner_type}": {
"get": {
"tags": [
"进销存",
"财务管理"
],
"summary": "Get Partner Product Statement",
"operationId": "get_partner_product_statement_api_finance_partner_product_statement__partner_type__get",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "partner_type",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Partner Type"
}
},
{
"name": "partner_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "null"
}
],
"title": "Partner Id"
}
},
{
"name": "year",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 2100,
"minimum": 2000
},
{
"type": "null"
}
],
"title": "Year"
}
},
{
"name": "quarter",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer",
"maximum": 4,
"minimum": 1
},
{
"type": "null"
}
],
"title": "Quarter"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FinancePartnerProductStatementResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/health": {
"get": {
"summary": "Health",
"operationId": "health_health_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
},
"post": {
"summary": "Health",
"operationId": "health_health_post",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
}
},
"components": {
"schemas": {
"BBox3D": {
"properties": {
"dimensions": {
"items": {
"type": "number"
},
"type": "array",
"title": "Dimensions"
},
"min": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Min"
},
"max": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Max"
}
},
"type": "object",
"title": "BBox3D"
},
"Body_batch_upload_api_batch_upload_post": {
"properties": {
"files": {
"items": {
"type": "string",
"contentMediaType": "application/octet-stream"
},
"type": "array",
"title": "Files"
},
"material": {
"type": "string",
"title": "Material",
"default": "ABS"
},
"draft_angle": {
"type": "number",
"title": "Draft Angle",
"default": 2.0
},
"shrinkage_rate": {
"type": "number",
"title": "Shrinkage Rate",
"default": 0.5
},
"parting_precision": {
"type": "number",
"title": "Parting Precision",
"default": 0.1
},
"cavity_match": {
"type": "integer",
"title": "Cavity Match",
"default": 95
}
},
"type": "object",
"required": [
"files"
],
"title": "Body_batch_upload_api_batch_upload_post"
},
"Body_login_api_auth_login_post": {
"properties": {
"grant_type": {
"anyOf": [
{
"type": "string",
"pattern": "^password$"
},
{
"type": "null"
}
],
"title": "Grant Type"
},
"username": {
"type": "string",
"title": "Username"
},
"password": {
"type": "string",
"format": "password",
"title": "Password"
},
"scope": {
"type": "string",
"title": "Scope",
"default": ""
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Client Id"
},
"client_secret": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"format": "password",
"title": "Client Secret"
}
},
"type": "object",
"required": [
"username",
"password"
],
"title": "Body_login_api_auth_login_post"
},
"Body_upload_stp_api_upload_post": {
"properties": {
"file": {
"type": "string",
"contentMediaType": "application/octet-stream",
"title": "File"
},
"material": {
"type": "string",
"title": "Material"
},
"draft_angle": {
"type": "number",
"title": "Draft Angle"
},
"shrinkage_rate": {
"type": "number",
"title": "Shrinkage Rate"
},
"parting_precision": {
"type": "number",
"title": "Parting Precision"
},
"cavity_match": {
"type": "integer",
"title": "Cavity Match"
}
},
"type": "object",
"required": [
"file",
"material",
"draft_angle",
"shrinkage_rate",
"parting_precision",
"cavity_match"
],
"title": "Body_upload_stp_api_upload_post"
},
"CamDesignRequest": {
"properties": {
"cavity_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"stock_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"mold_steel": {
"type": "string",
"title": "Mold Steel",
"default": "P20"
},
"surface_quality": {
"type": "string",
"title": "Surface Quality",
"default": "standard"
},
"controller": {
"type": "string",
"title": "Controller",
"default": "fanuc"
}
},
"type": "object",
"title": "CamDesignRequest"
},
"CamPlanRequest": {
"properties": {
"task_id": {
"type": "string",
"title": "Task Id"
},
"scheme_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scheme Id"
},
"mold_steel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Mold Steel"
},
"surface_quality": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Surface Quality"
},
"controller": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Controller"
},
"include_gcode": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Include Gcode"
}
},
"type": "object",
"required": [
"task_id"
],
"title": "CamPlanRequest",
"description": "未提供的偏好字段回落到任务持久化偏好,再回落到默认值。"
},
"CollisionCheckRequest": {
"properties": {
"toolpath_points": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array",
"title": "Toolpath Points"
},
"tool": {
"$ref": "#/components/schemas/ToolSpec"
},
"stock_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"clamp_positions": {
"anyOf": [
{
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Clamp Positions"
}
},
"type": "object",
"title": "CollisionCheckRequest"
},
"CoolingDesignRequest": {
"properties": {
"mold_size": {
"$ref": "#/components/schemas/MoldSize"
},
"product_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"material": {
"type": "string",
"title": "Material",
"default": "ABS"
},
"cavity_count": {
"type": "integer",
"maximum": 64.0,
"minimum": 1.0,
"title": "Cavity Count",
"default": 1
},
"cycle_time_target": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Cycle Time Target"
}
},
"type": "object",
"title": "CoolingDesignRequest"
},
"CostEstimateRequest": {
"properties": {
"task_id": {
"type": "string",
"title": "Task Id"
}
},
"type": "object",
"required": [
"task_id"
],
"title": "CostEstimateRequest"
},
"CustomerCreate": {
"properties": {
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"contact_person": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Person"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email"
},
"address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Address"
}
},
"type": "object",
"required": [
"name"
],
"title": "CustomerCreate"
},
"CustomerResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"contact_person": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Person"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email"
},
"is_active": {
"type": "boolean",
"title": "Is Active"
}
},
"type": "object",
"required": [
"id",
"code",
"name",
"contact_person",
"phone",
"email",
"is_active"
],
"title": "CustomerResponse"
},
"ElectrodeDesignRequest": {
"properties": {
"undercut_regions": {
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array",
"title": "Undercut Regions"
},
"cavity_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"material": {
"type": "string",
"title": "Material",
"default": "copper"
},
"spark_gap": {
"type": "number",
"title": "Spark Gap",
"default": 0.05
},
"overburn": {
"type": "number",
"title": "Overburn",
"default": 0.1
}
},
"type": "object",
"title": "ElectrodeDesignRequest"
},
"ExportMoldRequest": {
"properties": {
"task_id": {
"type": "string",
"title": "Task Id"
},
"scheme_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scheme Id"
},
"formats": {
"items": {
"type": "string"
},
"type": "array",
"title": "Formats"
},
"components": {
"items": {
"type": "string"
},
"type": "array",
"title": "Components"
}
},
"type": "object",
"required": [
"task_id"
],
"title": "ExportMoldRequest"
},
"FinanceAllocationCreate": {
"properties": {
"order_type": {
"type": "string",
"enum": [
"sales",
"purchase"
],
"title": "Order Type"
},
"order_id": {
"type": "integer",
"title": "Order Id"
},
"allocated_amount": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0.0
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Allocated Amount"
}
},
"type": "object",
"required": [
"order_type",
"order_id",
"allocated_amount"
],
"title": "FinanceAllocationCreate"
},
"FinanceAllocationResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"order_type": {
"type": "string",
"title": "Order Type"
},
"order_id": {
"type": "integer",
"title": "Order Id"
},
"allocated_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Allocated Amount"
}
},
"type": "object",
"required": [
"id",
"order_type",
"order_id",
"allocated_amount"
],
"title": "FinanceAllocationResponse"
},
"FinancePartnerProductStatementResponse": {
"properties": {
"partner_type": {
"type": "string",
"enum": [
"customer",
"supplier"
],
"title": "Partner Type"
},
"year": {
"type": "integer",
"title": "Year"
},
"quarter": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Quarter"
},
"period_label": {
"type": "string",
"title": "Period Label"
},
"partner_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Partner Id"
},
"order_amount_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Order Amount Total"
},
"settled_amount_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Settled Amount Total"
},
"outstanding_amount_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Outstanding Amount Total"
},
"items": {
"items": {
"$ref": "#/components/schemas/PartnerProductStatementItemResponse"
},
"type": "array",
"title": "Items",
"default": []
}
},
"type": "object",
"required": [
"partner_type",
"year",
"period_label",
"order_amount_total",
"settled_amount_total",
"outstanding_amount_total"
],
"title": "FinancePartnerProductStatementResponse"
},
"FinancePartnerStatementResponse": {
"properties": {
"partner_type": {
"type": "string",
"enum": [
"customer",
"supplier"
],
"title": "Partner Type"
},
"year": {
"type": "integer",
"title": "Year"
},
"quarter": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Quarter"
},
"period_label": {
"type": "string",
"title": "Period Label"
},
"order_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Order Total"
},
"settled_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Settled Total"
},
"transaction_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Transaction Total"
},
"outstanding_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Outstanding Total"
},
"items": {
"items": {
"$ref": "#/components/schemas/PartnerStatementItemResponse"
},
"type": "array",
"title": "Items",
"default": []
}
},
"type": "object",
"required": [
"partner_type",
"year",
"period_label",
"order_total",
"settled_total",
"transaction_total",
"outstanding_total"
],
"title": "FinancePartnerStatementResponse"
},
"FinanceSummaryResponse": {
"properties": {
"receivable_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Receivable Total"
},
"payable_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Payable Total"
},
"monthly_receipt_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Monthly Receipt Total"
},
"monthly_payment_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Monthly Payment Total"
},
"selected_year": {
"type": "integer",
"title": "Selected Year"
},
"selected_quarter": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Selected Quarter"
},
"period_label": {
"type": "string",
"title": "Period Label"
},
"period_receipt_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Period Receipt Total",
"default": "0"
},
"period_payment_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Period Payment Total",
"default": "0"
},
"overdue_receivable_count": {
"type": "integer",
"title": "Overdue Receivable Count",
"default": 0
},
"overdue_payable_count": {
"type": "integer",
"title": "Overdue Payable Count",
"default": 0
}
},
"type": "object",
"required": [
"receivable_total",
"payable_total",
"monthly_receipt_total",
"monthly_payment_total",
"selected_year",
"period_label"
],
"title": "FinanceSummaryResponse"
},
"FinanceTransactionResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"txn_no": {
"type": "string",
"title": "Txn No"
},
"txn_type": {
"type": "string",
"enum": [
"receipt",
"payment"
],
"title": "Txn Type"
},
"partner_type": {
"type": "string",
"enum": [
"customer",
"supplier"
],
"title": "Partner Type"
},
"partner_id": {
"type": "integer",
"title": "Partner Id"
},
"partner_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Partner Name"
},
"amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Amount"
},
"txn_date": {
"type": "string",
"format": "date-time",
"title": "Txn Date"
},
"method": {
"type": "string",
"title": "Method"
},
"account_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Account Name"
},
"status": {
"type": "string",
"enum": [
"confirmed",
"voided"
],
"title": "Status"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"allocations": {
"items": {
"$ref": "#/components/schemas/FinanceAllocationResponse"
},
"type": "array",
"title": "Allocations",
"default": []
}
},
"type": "object",
"required": [
"id",
"txn_no",
"txn_type",
"partner_type",
"partner_id",
"amount",
"txn_date",
"method",
"account_name",
"status",
"remark",
"created_at"
],
"title": "FinanceTransactionResponse"
},
"GatingDesignRequest": {
"properties": {
"product_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"material": {
"type": "string",
"title": "Material",
"default": "ABS"
},
"cavity_count": {
"type": "integer",
"maximum": 64.0,
"minimum": 1.0,
"title": "Cavity Count",
"default": 1
},
"gate_type": {
"type": "string",
"title": "Gate Type",
"default": "auto"
},
"layout_positions": {
"anyOf": [
{
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Layout Positions"
}
},
"type": "object",
"title": "GatingDesignRequest"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"InventoryCreate": {
"properties": {
"product_id": {
"type": "integer",
"title": "Product Id"
},
"warehouse_id": {
"type": "integer",
"title": "Warehouse Id"
},
"quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Quantity",
"default": "0"
},
"locked_quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Locked Quantity",
"default": "0"
},
"batch_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Batch Number"
},
"location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Location"
}
},
"type": "object",
"required": [
"product_id",
"warehouse_id"
],
"title": "InventoryCreate"
},
"InventoryResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"product_sku": {
"type": "string",
"title": "Product Sku"
},
"warehouse_id": {
"type": "integer",
"title": "Warehouse Id"
},
"warehouse_name": {
"type": "string",
"title": "Warehouse Name"
},
"quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Quantity"
},
"locked_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Locked Quantity"
},
"available_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Available Quantity"
}
},
"type": "object",
"required": [
"id",
"product_id",
"product_name",
"product_sku",
"warehouse_id",
"warehouse_name",
"quantity",
"locked_quantity",
"available_quantity"
],
"title": "InventoryResponse"
},
"InventoryUpdate": {
"properties": {
"quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
},
{
"type": "null"
}
],
"title": "Quantity"
},
"locked_quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
},
{
"type": "null"
}
],
"title": "Locked Quantity"
},
"batch_number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Batch Number"
},
"location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Location"
}
},
"type": "object",
"title": "InventoryUpdate"
},
"LoginRequest": {
"properties": {
"username": {
"type": "string",
"title": "Username"
},
"password": {
"type": "string",
"title": "Password"
}
},
"type": "object",
"required": [
"username",
"password"
],
"title": "LoginRequest"
},
"MachiningSimulateRequest": {
"properties": {
"operations": {
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array",
"title": "Operations"
},
"stock_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"resolution": {
"type": "number",
"title": "Resolution",
"default": 2.0
}
},
"type": "object",
"title": "MachiningSimulateRequest"
},
"MaterialConsumptionItem": {
"properties": {
"material_id": {
"type": "integer",
"title": "Material Id"
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0.0,
"title": "Quantity"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"material_id",
"quantity"
],
"title": "MaterialConsumptionItem"
},
"MaterialConsumptionRequest": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/MaterialConsumptionItem"
},
"type": "array",
"minItems": 1,
"title": "Items"
}
},
"type": "object",
"required": [
"items"
],
"title": "MaterialConsumptionRequest"
},
"MaterialPriceHistoryCreate": {
"properties": {
"price": {
"type": "number",
"exclusiveMinimum": 0.0,
"title": "Price",
"description": "物料价格"
},
"supplier_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Supplier Id",
"description": "供应商ID"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark",
"description": "备注"
}
},
"type": "object",
"required": [
"price"
],
"title": "MaterialPriceHistoryCreate",
"description": "创建物料价格历史的请求模型"
},
"MaterialPriceHistoryResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"type": "string",
"title": "Product Sku"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"price": {
"type": "number",
"title": "Price"
},
"effective_date": {
"type": "string",
"format": "date-time",
"title": "Effective Date"
},
"supplier_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Supplier Id"
},
"supplier_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Supplier Name"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"product_id",
"product_sku",
"product_name",
"price",
"effective_date",
"supplier_id",
"supplier_name",
"remark",
"created_at"
],
"title": "MaterialPriceHistoryResponse",
"description": "物料价格历史的响应模型"
},
"MaterialPriceTrendResponse": {
"properties": {
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"type": "string",
"title": "Product Sku"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"current_price": {
"type": "number",
"title": "Current Price"
},
"price_change": {
"type": "number",
"title": "Price Change"
},
"price_change_percent": {
"type": "number",
"title": "Price Change Percent"
},
"price_history": {
"items": {
"$ref": "#/components/schemas/PriceHistoryItem"
},
"type": "array",
"title": "Price History"
}
},
"type": "object",
"required": [
"product_id",
"product_sku",
"product_name",
"current_price",
"price_change",
"price_change_percent",
"price_history"
],
"title": "MaterialPriceTrendResponse",
"description": "物料价格趋势的响应模型"
},
"MaterialSupplierCreate": {
"properties": {
"supplier_id": {
"type": "integer",
"title": "Supplier Id",
"description": "供应商ID"
},
"is_primary": {
"type": "boolean",
"title": "Is Primary",
"description": "是否为主要供应商",
"default": false
},
"contact_person": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Person",
"description": "联系人"
},
"contact_phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Phone",
"description": "联系电话"
},
"lead_time": {
"anyOf": [
{
"type": "integer",
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Lead Time",
"description": "交货周期(天)"
},
"min_order_quantity": {
"anyOf": [
{
"type": "integer",
"minimum": 1.0
},
{
"type": "null"
}
],
"title": "Min Order Quantity",
"description": "最小订购量"
}
},
"type": "object",
"required": [
"supplier_id"
],
"title": "MaterialSupplierCreate",
"description": "创建物料供应商关联的请求模型"
},
"MaterialSupplierResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"type": "string",
"title": "Product Sku"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
},
"supplier_name": {
"type": "string",
"title": "Supplier Name"
},
"is_primary": {
"type": "boolean",
"title": "Is Primary"
},
"contact_person": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Person"
},
"contact_phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Phone"
},
"lead_time": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Lead Time"
},
"min_order_quantity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Min Order Quantity"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"updated_at": {
"type": "string",
"format": "date-time",
"title": "Updated At"
}
},
"type": "object",
"required": [
"id",
"product_id",
"product_sku",
"product_name",
"supplier_id",
"supplier_name",
"is_primary",
"contact_person",
"contact_phone",
"lead_time",
"min_order_quantity",
"created_at",
"updated_at"
],
"title": "MaterialSupplierResponse",
"description": "物料供应商关联的响应模型"
},
"MoldSize": {
"properties": {
"length": {
"type": "number",
"title": "Length",
"default": 300.0
},
"width": {
"type": "number",
"title": "Width",
"default": 300.0
},
"height": {
"type": "number",
"title": "Height",
"default": 200.0
}
},
"type": "object",
"title": "MoldSize"
},
"MoldSystemDesignRequest": {
"properties": {
"mold_size": {
"$ref": "#/components/schemas/MoldSize"
},
"product_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"material": {
"type": "string",
"title": "Material",
"default": "ABS"
},
"cavity_count": {
"type": "integer",
"maximum": 64.0,
"minimum": 1.0,
"title": "Cavity Count",
"default": 1
},
"gate_type": {
"type": "string",
"title": "Gate Type",
"default": "auto"
},
"cycle_time_target": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Cycle Time Target"
},
"layout_positions": {
"anyOf": [
{
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Layout Positions"
}
},
"type": "object",
"title": "MoldSystemDesignRequest"
},
"OptimizeLayoutRequest": {
"properties": {
"product_bbox": {
"$ref": "#/components/schemas/BBox3D"
},
"cavity_count": {
"type": "integer",
"maximum": 64.0,
"minimum": 1.0,
"title": "Cavity Count",
"default": 1
},
"mold_base_size": {
"anyOf": [
{
"$ref": "#/components/schemas/BBox3D"
},
{
"type": "null"
}
]
},
"layout_type": {
"type": "string",
"title": "Layout Type",
"default": "auto"
}
},
"type": "object",
"title": "OptimizeLayoutRequest"
},
"PaginatedResponse_FinanceTransactionResponse_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/FinanceTransactionResponse"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"title": "Total"
},
"skip": {
"type": "integer",
"title": "Skip"
},
"limit": {
"type": "integer",
"title": "Limit"
}
},
"type": "object",
"required": [
"items",
"total",
"skip",
"limit"
],
"title": "PaginatedResponse[FinanceTransactionResponse]"
},
"PaginatedResponse_InventoryResponse_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/InventoryResponse"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"title": "Total"
},
"skip": {
"type": "integer",
"title": "Skip"
},
"limit": {
"type": "integer",
"title": "Limit"
}
},
"type": "object",
"required": [
"items",
"total",
"skip",
"limit"
],
"title": "PaginatedResponse[InventoryResponse]"
},
"PaginatedResponse_PurchaseOrderResponse_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/PurchaseOrderResponse"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"title": "Total"
},
"skip": {
"type": "integer",
"title": "Skip"
},
"limit": {
"type": "integer",
"title": "Limit"
}
},
"type": "object",
"required": [
"items",
"total",
"skip",
"limit"
],
"title": "PaginatedResponse[PurchaseOrderResponse]"
},
"PaginatedResponse_SalesOrderResponse_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/SalesOrderResponse"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"title": "Total"
},
"skip": {
"type": "integer",
"title": "Skip"
},
"limit": {
"type": "integer",
"title": "Limit"
}
},
"type": "object",
"required": [
"items",
"total",
"skip",
"limit"
],
"title": "PaginatedResponse[SalesOrderResponse]"
},
"PaginatedResponse_StockMovementResponse_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/StockMovementResponse"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"title": "Total"
},
"skip": {
"type": "integer",
"title": "Skip"
},
"limit": {
"type": "integer",
"title": "Limit"
}
},
"type": "object",
"required": [
"items",
"total",
"skip",
"limit"
],
"title": "PaginatedResponse[StockMovementResponse]"
},
"PartnerProductStatementItemResponse": {
"properties": {
"partner_id": {
"type": "integer",
"title": "Partner Id"
},
"partner_name": {
"type": "string",
"title": "Partner Name"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Sku"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"order_count": {
"type": "integer",
"title": "Order Count"
},
"order_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Order Quantity"
},
"order_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Order Amount"
},
"settled_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Settled Amount"
},
"outstanding_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Outstanding Amount"
},
"period_year": {
"type": "integer",
"title": "Period Year"
},
"period_quarter": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Period Quarter"
}
},
"type": "object",
"required": [
"partner_id",
"partner_name",
"product_id",
"product_name",
"order_count",
"order_quantity",
"order_amount",
"settled_amount",
"outstanding_amount",
"period_year"
],
"title": "PartnerProductStatementItemResponse"
},
"PartnerStatementItemResponse": {
"properties": {
"partner_id": {
"type": "integer",
"title": "Partner Id"
},
"partner_name": {
"type": "string",
"title": "Partner Name"
},
"order_count": {
"type": "integer",
"title": "Order Count"
},
"transaction_count": {
"type": "integer",
"title": "Transaction Count"
},
"order_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Order Total"
},
"settled_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Settled Total"
},
"transaction_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Transaction Total"
},
"outstanding_total": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Outstanding Total"
},
"period_year": {
"type": "integer",
"title": "Period Year"
},
"period_quarter": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Period Quarter"
}
},
"type": "object",
"required": [
"partner_id",
"partner_name",
"order_count",
"transaction_count",
"order_total",
"settled_total",
"transaction_total",
"outstanding_total",
"period_year"
],
"title": "PartnerStatementItemResponse"
},
"PayableItemResponse": {
"properties": {
"order_id": {
"type": "integer",
"title": "Order Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
},
"supplier_name": {
"type": "string",
"title": "Supplier Name"
},
"order_date": {
"type": "string",
"format": "date-time",
"title": "Order Date"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
},
"paid_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Paid Amount"
},
"payable_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Payable Amount"
},
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": [
"order_id",
"order_no",
"supplier_id",
"supplier_name",
"order_date",
"total_amount",
"paid_amount",
"payable_amount",
"status"
],
"title": "PayableItemResponse"
},
"PaymentCreate": {
"properties": {
"amount": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0.0
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Amount"
},
"txn_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Txn Date"
},
"method": {
"type": "string",
"title": "Method",
"default": "bank"
},
"account_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Account Name"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"allocations": {
"items": {
"$ref": "#/components/schemas/FinanceAllocationCreate"
},
"type": "array",
"title": "Allocations"
},
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
}
},
"type": "object",
"required": [
"amount",
"allocations",
"supplier_id"
],
"title": "PaymentCreate"
},
"PermissionCreate": {
"properties": {
"code": {
"type": "string",
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"module": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Module"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"type": "object",
"required": [
"code",
"name"
],
"title": "PermissionCreate"
},
"PermissionResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"code": {
"type": "string",
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"module": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Module"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"type": "object",
"required": [
"id",
"code",
"name",
"module",
"description"
],
"title": "PermissionResponse"
},
"PriceHistoryItem": {
"properties": {
"date": {
"type": "string",
"format": "date-time",
"title": "Date"
},
"price": {
"type": "number",
"title": "Price"
},
"supplier_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Supplier Name"
}
},
"type": "object",
"required": [
"date",
"price",
"supplier_name"
],
"title": "PriceHistoryItem",
"description": "价格历史项"
},
"ProductBOMResponse": {
"properties": {
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"total_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Material Cost"
},
"items": {
"items": {
"$ref": "#/components/schemas/ProductMaterialItemResponse"
},
"type": "array",
"title": "Items"
}
},
"type": "object",
"required": [
"product_id",
"product_name",
"total_material_cost",
"items"
],
"title": "ProductBOMResponse"
},
"ProductBOMUpdate": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/ProductMaterialItemUpdate"
},
"type": "array",
"title": "Items"
}
},
"type": "object",
"required": [
"items"
],
"title": "ProductBOMUpdate"
},
"ProductCreate": {
"properties": {
"sku": {
"type": "string",
"title": "Sku"
},
"name": {
"type": "string",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category"
},
"unit": {
"type": "string",
"title": "Unit",
"default": "件"
},
"item_type": {
"type": "string",
"title": "Item Type",
"default": "finished"
},
"cost_price": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Cost Price",
"default": "0"
},
"sale_price": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Sale Price",
"default": "0"
},
"min_stock": {
"type": "integer",
"title": "Min Stock",
"default": 0
},
"max_stock": {
"type": "integer",
"title": "Max Stock",
"default": 1000
}
},
"type": "object",
"required": [
"sku",
"name"
],
"title": "ProductCreate"
},
"ProductMaterialItemResponse": {
"properties": {
"material_id": {
"type": "integer",
"title": "Material Id"
},
"material_sku": {
"type": "string",
"title": "Material Sku"
},
"material_name": {
"type": "string",
"title": "Material Name"
},
"quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Quantity"
},
"unit_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Unit Cost"
},
"line_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Line Cost"
}
},
"type": "object",
"required": [
"material_id",
"material_sku",
"material_name",
"quantity",
"unit_cost",
"line_cost"
],
"title": "ProductMaterialItemResponse"
},
"ProductMaterialItemUpdate": {
"properties": {
"material_id": {
"type": "integer",
"title": "Material Id"
},
"quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Quantity"
},
"loss_rate": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Loss Rate",
"default": "0"
}
},
"type": "object",
"required": [
"material_id",
"quantity"
],
"title": "ProductMaterialItemUpdate"
},
"ProductResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"sku": {
"type": "string",
"title": "Sku"
},
"name": {
"type": "string",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Category"
},
"unit": {
"type": "string",
"title": "Unit"
},
"item_type": {
"type": "string",
"title": "Item Type"
},
"cost_price": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Cost Price"
},
"sale_price": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Sale Price"
},
"min_stock": {
"type": "integer",
"title": "Min Stock"
},
"max_stock": {
"type": "integer",
"title": "Max Stock"
},
"material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Material Cost",
"default": "0"
},
"is_active": {
"type": "boolean",
"title": "Is Active"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"sku",
"name",
"description",
"category",
"unit",
"item_type",
"cost_price",
"sale_price",
"min_stock",
"max_stock",
"is_active",
"created_at"
],
"title": "ProductResponse"
},
"ProductionMaterialPlanItemResponse": {
"properties": {
"material_id": {
"type": "integer",
"title": "Material Id"
},
"material_sku": {
"type": "string",
"title": "Material Sku"
},
"material_name": {
"type": "string",
"title": "Material Name"
},
"required_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Required Quantity"
},
"available_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Available Quantity"
},
"shortage_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Shortage Quantity"
},
"unit_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Unit Cost"
},
"required_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Required Cost"
}
},
"type": "object",
"required": [
"material_id",
"material_sku",
"material_name",
"required_quantity",
"available_quantity",
"shortage_quantity",
"unit_cost",
"required_cost"
],
"title": "ProductionMaterialPlanItemResponse"
},
"PurchaseDemandCalculateRequest": {
"properties": {
"sales_order_ids": {
"items": {
"type": "integer"
},
"type": "array",
"minItems": 1,
"title": "Sales Order Ids",
"description": "销售订单ID列表"
}
},
"type": "object",
"required": [
"sales_order_ids"
],
"title": "PurchaseDemandCalculateRequest",
"description": "计算采购需求的请求体"
},
"PurchaseDemandConvertItem": {
"properties": {
"material_id": {
"type": "integer",
"title": "Material Id"
},
"quantity": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0.0
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Quantity",
"description": "采购数量(通常取缺口量)"
},
"unit_cost": {
"anyOf": [
{
"type": "number",
"minimum": 0.0
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Unit Cost",
"description": "单价"
},
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
}
},
"type": "object",
"required": [
"material_id",
"quantity",
"unit_cost",
"supplier_id"
],
"title": "PurchaseDemandConvertItem",
"description": "待转采购单的单条需求"
},
"PurchaseDemandConvertRequest": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/PurchaseDemandConvertItem"
},
"type": "array",
"minItems": 1,
"title": "Items"
},
"expected_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Expected Date"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"items"
],
"title": "PurchaseDemandConvertRequest",
"description": "一键生成采购单请求(按 supplier_id 分组,每组生成一张草稿采购单)"
},
"PurchaseDemandConvertResponse": {
"properties": {
"created_orders": {
"items": {
"$ref": "#/components/schemas/PurchaseOrderCreatedResponse"
},
"type": "array",
"title": "Created Orders"
},
"skipped": {
"type": "integer",
"title": "Skipped",
"description": "因数量<=0被跳过的条目数",
"default": 0
}
},
"type": "object",
"title": "PurchaseDemandConvertResponse",
"description": "一键生成采购单结果"
},
"PurchaseDemandItemResponse": {
"properties": {
"material_id": {
"type": "integer",
"title": "Material Id"
},
"material_sku": {
"type": "string",
"title": "Material Sku"
},
"material_name": {
"type": "string",
"title": "Material Name"
},
"required_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Required Quantity",
"description": "BOM 需求量"
},
"available_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Available Quantity",
"description": "当前库存量"
},
"shortage_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Shortage Quantity",
"description": "缺口数量 = required - available"
},
"unit_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Unit Cost",
"description": "物料单价"
},
"estimated_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Estimated Cost",
"description": "预计采购金额 = shortage × unit_cost"
},
"suggested_supplier_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Suggested Supplier Id",
"description": "建议供应商ID"
},
"suggested_supplier_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Suggested Supplier Name",
"description": "建议供应商名称"
},
"supplier_lead_time": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Supplier Lead Time",
"description": "供应商交货周期(天)"
}
},
"type": "object",
"required": [
"material_id",
"material_sku",
"material_name",
"required_quantity",
"available_quantity",
"shortage_quantity",
"unit_cost",
"estimated_cost"
],
"title": "PurchaseDemandItemResponse",
"description": "单个物料的采购建议"
},
"PurchaseDemandResponse": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/PurchaseDemandItemResponse"
},
"type": "array",
"title": "Items"
},
"total_estimated_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Estimated Cost",
"description": "预计采购总金额",
"default": "0"
},
"shortage_count": {
"type": "integer",
"title": "Shortage Count",
"description": "缺货物料种类数",
"default": 0
},
"source_order_ids": {
"items": {
"type": "integer"
},
"type": "array",
"title": "Source Order Ids",
"description": "来源销售订单ID"
},
"source_order_nos": {
"items": {
"type": "string"
},
"type": "array",
"title": "Source Order Nos",
"description": "来源销售订单编号"
}
},
"type": "object",
"title": "PurchaseDemandResponse",
"description": "采购需求计算结果"
},
"PurchaseOrderCreate": {
"properties": {
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
},
"expected_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Expected Date"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"items": {
"items": {
"$ref": "#/components/schemas/PurchaseOrderItemCreate"
},
"type": "array",
"minItems": 1,
"title": "Items"
}
},
"type": "object",
"required": [
"supplier_id",
"items"
],
"title": "PurchaseOrderCreate"
},
"PurchaseOrderCreatedResponse": {
"properties": {
"purchase_order_id": {
"type": "integer",
"title": "Purchase Order Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
},
"supplier_name": {
"type": "string",
"title": "Supplier Name"
},
"item_count": {
"type": "integer",
"title": "Item Count"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
}
},
"type": "object",
"required": [
"purchase_order_id",
"order_no",
"supplier_id",
"supplier_name",
"item_count",
"total_amount"
],
"title": "PurchaseOrderCreatedResponse",
"description": "已创建的采购单摘要"
},
"PurchaseOrderDetailResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"supplier_name": {
"type": "string",
"title": "Supplier Name"
},
"order_date": {
"type": "string",
"format": "date-time",
"title": "Order Date"
},
"expected_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Expected Date"
},
"status": {
"type": "string",
"title": "Status"
},
"receipt_status": {
"type": "string",
"title": "Receipt Status"
},
"payment_status": {
"type": "string",
"title": "Payment Status"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
},
"paid_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Paid Amount"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"received_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Received Date"
},
"paid_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Paid Date"
},
"supplier_id": {
"type": "integer",
"title": "Supplier Id"
},
"items": {
"items": {
"$ref": "#/components/schemas/PurchaseOrderItemResponse"
},
"type": "array",
"title": "Items"
}
},
"type": "object",
"required": [
"id",
"order_no",
"supplier_name",
"order_date",
"expected_date",
"status",
"receipt_status",
"payment_status",
"total_amount",
"paid_amount",
"remark",
"created_at",
"received_date",
"paid_date",
"supplier_id",
"items"
],
"title": "PurchaseOrderDetailResponse"
},
"PurchaseOrderItemCreate": {
"properties": {
"product_id": {
"type": "integer",
"title": "Product Id"
},
"quantity": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Quantity",
"description": "采购数量"
},
"unit_price": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
},
{
"type": "null"
}
],
"title": "Unit Price",
"description": "单价(可选,不填则使用物料成本价格)"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"product_id",
"quantity"
],
"title": "PurchaseOrderItemCreate"
},
"PurchaseOrderItemResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"type": "string",
"title": "Product Sku"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"quantity": {
"type": "integer",
"title": "Quantity"
},
"received_quantity": {
"type": "integer",
"title": "Received Quantity"
},
"unit_price": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Unit Price"
},
"amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Amount"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"id",
"product_id",
"product_sku",
"product_name",
"quantity",
"received_quantity",
"unit_price",
"amount"
],
"title": "PurchaseOrderItemResponse"
},
"PurchaseOrderReceiveItem": {
"properties": {
"item_id": {
"type": "integer",
"title": "Item Id"
},
"receive_quantity": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Receive Quantity"
}
},
"type": "object",
"required": [
"item_id",
"receive_quantity"
],
"title": "PurchaseOrderReceiveItem"
},
"PurchaseOrderReceiveRequest": {
"properties": {
"warehouse_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Warehouse Id"
},
"items": {
"items": {
"$ref": "#/components/schemas/PurchaseOrderReceiveItem"
},
"type": "array",
"minItems": 1,
"title": "Items"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"items"
],
"title": "PurchaseOrderReceiveRequest"
},
"PurchaseOrderResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"supplier_name": {
"type": "string",
"title": "Supplier Name"
},
"order_date": {
"type": "string",
"format": "date-time",
"title": "Order Date"
},
"expected_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Expected Date"
},
"status": {
"type": "string",
"title": "Status"
},
"receipt_status": {
"type": "string",
"title": "Receipt Status"
},
"payment_status": {
"type": "string",
"title": "Payment Status"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
},
"paid_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Paid Amount"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"received_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Received Date"
},
"paid_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Paid Date"
}
},
"type": "object",
"required": [
"id",
"order_no",
"supplier_name",
"order_date",
"expected_date",
"status",
"receipt_status",
"payment_status",
"total_amount",
"paid_amount",
"remark",
"created_at",
"received_date",
"paid_date"
],
"title": "PurchaseOrderResponse"
},
"ReceiptCreate": {
"properties": {
"amount": {
"anyOf": [
{
"type": "number",
"exclusiveMinimum": 0.0
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Amount"
},
"txn_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Txn Date"
},
"method": {
"type": "string",
"title": "Method",
"default": "bank"
},
"account_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Account Name"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"allocations": {
"items": {
"$ref": "#/components/schemas/FinanceAllocationCreate"
},
"type": "array",
"title": "Allocations"
},
"customer_id": {
"type": "integer",
"title": "Customer Id"
}
},
"type": "object",
"required": [
"amount",
"allocations",
"customer_id"
],
"title": "ReceiptCreate"
},
"ReceivableItemResponse": {
"properties": {
"order_id": {
"type": "integer",
"title": "Order Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"customer_id": {
"type": "integer",
"title": "Customer Id"
},
"customer_name": {
"type": "string",
"title": "Customer Name"
},
"order_date": {
"type": "string",
"format": "date-time",
"title": "Order Date"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
},
"received_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Received Amount"
},
"receivable_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Receivable Amount"
},
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": [
"order_id",
"order_no",
"customer_id",
"customer_name",
"order_date",
"total_amount",
"received_amount",
"receivable_amount",
"status"
],
"title": "ReceivableItemResponse"
},
"ResetPasswordRequest": {
"properties": {
"new_password": {
"type": "string",
"minLength": 6,
"title": "New Password"
}
},
"type": "object",
"required": [
"new_password"
],
"title": "ResetPasswordRequest"
},
"RoleCreate": {
"properties": {
"code": {
"type": "string",
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
}
},
"type": "object",
"required": [
"code",
"name"
],
"title": "RoleCreate"
},
"RoleResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"code": {
"type": "string",
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"is_system": {
"type": "boolean",
"title": "Is System"
},
"permissions": {
"items": {
"type": "string"
},
"type": "array",
"title": "Permissions"
}
},
"type": "object",
"required": [
"id",
"code",
"name",
"description",
"is_system",
"permissions"
],
"title": "RoleResponse"
},
"SalesOrderCreate": {
"properties": {
"customer_id": {
"type": "integer",
"title": "Customer Id"
},
"delivery_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Delivery Date"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"items": {
"items": {
"$ref": "#/components/schemas/SalesOrderItemCreate"
},
"type": "array",
"minItems": 1,
"title": "Items"
}
},
"type": "object",
"required": [
"customer_id",
"items"
],
"title": "SalesOrderCreate"
},
"SalesOrderDetailResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"customer_name": {
"type": "string",
"title": "Customer Name"
},
"order_date": {
"type": "string",
"format": "date-time",
"title": "Order Date"
},
"delivery_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Delivery Date"
},
"manufacturing_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Manufacturing Date"
},
"actual_delivery_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Actual Delivery Date"
},
"actual_payment_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Actual Payment Date"
},
"status": {
"type": "string",
"title": "Status"
},
"delivery_status": {
"type": "string",
"title": "Delivery Status"
},
"payment_status": {
"type": "string",
"title": "Payment Status"
},
"production_status": {
"type": "string",
"title": "Production Status"
},
"production_no": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Production No"
},
"planned_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Planned Material Cost"
},
"actual_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Actual Material Cost"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
},
"received_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Received Amount"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"customer_id": {
"type": "integer",
"title": "Customer Id"
},
"items": {
"items": {
"$ref": "#/components/schemas/SalesOrderItemResponse"
},
"type": "array",
"title": "Items"
}
},
"type": "object",
"required": [
"id",
"order_no",
"customer_name",
"order_date",
"delivery_date",
"manufacturing_date",
"actual_delivery_date",
"actual_payment_date",
"status",
"delivery_status",
"payment_status",
"production_status",
"production_no",
"planned_material_cost",
"actual_material_cost",
"total_amount",
"received_amount",
"remark",
"created_at",
"customer_id",
"items"
],
"title": "SalesOrderDetailResponse"
},
"SalesOrderIssueRequest": {
"properties": {
"warehouse_id": {
"type": "integer",
"title": "Warehouse Id"
},
"production_no": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Production No"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"warehouse_id"
],
"title": "SalesOrderIssueRequest"
},
"SalesOrderIssueResponse": {
"properties": {
"sales_order_id": {
"type": "integer",
"title": "Sales Order Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"production_no": {
"type": "string",
"title": "Production No"
},
"movement_count": {
"type": "integer",
"title": "Movement Count"
},
"planned_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Planned Material Cost"
},
"actual_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Actual Material Cost"
},
"cost_deviation": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Cost Deviation"
},
"cost_deviation_rate": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Cost Deviation Rate"
},
"production_status": {
"type": "string",
"title": "Production Status"
}
},
"type": "object",
"required": [
"sales_order_id",
"order_no",
"production_no",
"movement_count",
"planned_material_cost",
"actual_material_cost",
"cost_deviation",
"cost_deviation_rate",
"production_status"
],
"title": "SalesOrderIssueResponse"
},
"SalesOrderItemCreate": {
"properties": {
"product_id": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Product Id"
},
"product_sku": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Sku"
},
"product_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Name"
},
"product_category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Category"
},
"product_unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Unit",
"default": "件"
},
"quantity": {
"type": "integer",
"exclusiveMinimum": 0.0,
"title": "Quantity"
},
"unit_price": {
"anyOf": [
{
"type": "number",
"minimum": 0.0
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Unit Price"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"quantity",
"unit_price"
],
"title": "SalesOrderItemCreate"
},
"SalesOrderItemResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"quantity": {
"type": "integer",
"title": "Quantity"
},
"delivered_quantity": {
"type": "integer",
"title": "Delivered Quantity"
},
"unit_price": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Unit Price"
},
"amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Amount"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"id",
"product_id",
"quantity",
"delivered_quantity",
"unit_price",
"amount"
],
"title": "SalesOrderItemResponse"
},
"SalesOrderProductionPlanResponse": {
"properties": {
"sales_order_id": {
"type": "integer",
"title": "Sales Order Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"customer_name": {
"type": "string",
"title": "Customer Name"
},
"production_no": {
"type": "string",
"title": "Production No"
},
"planned_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Planned Material Cost"
},
"items": {
"items": {
"$ref": "#/components/schemas/ProductionMaterialPlanItemResponse"
},
"type": "array",
"title": "Items"
}
},
"type": "object",
"required": [
"sales_order_id",
"order_no",
"customer_name",
"production_no",
"planned_material_cost",
"items"
],
"title": "SalesOrderProductionPlanResponse"
},
"SalesOrderResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"order_no": {
"type": "string",
"title": "Order No"
},
"customer_name": {
"type": "string",
"title": "Customer Name"
},
"order_date": {
"type": "string",
"format": "date-time",
"title": "Order Date"
},
"delivery_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Delivery Date"
},
"manufacturing_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Manufacturing Date"
},
"actual_delivery_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Actual Delivery Date"
},
"actual_payment_date": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Actual Payment Date"
},
"status": {
"type": "string",
"title": "Status"
},
"delivery_status": {
"type": "string",
"title": "Delivery Status"
},
"payment_status": {
"type": "string",
"title": "Payment Status"
},
"production_status": {
"type": "string",
"title": "Production Status"
},
"production_no": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Production No"
},
"planned_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Planned Material Cost"
},
"actual_material_cost": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Actual Material Cost"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount"
},
"received_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Received Amount"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"order_no",
"customer_name",
"order_date",
"delivery_date",
"manufacturing_date",
"actual_delivery_date",
"actual_payment_date",
"status",
"delivery_status",
"payment_status",
"production_status",
"production_no",
"planned_material_cost",
"actual_material_cost",
"total_amount",
"received_amount",
"remark",
"created_at"
],
"title": "SalesOrderResponse"
},
"SalesOrderStatusUpdate": {
"properties": {
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": [
"status"
],
"title": "SalesOrderStatusUpdate"
},
"StockMovementCreate": {
"properties": {
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Sku"
},
"warehouse_id": {
"type": "integer",
"title": "Warehouse Id"
},
"movement_type": {
"type": "string",
"title": "Movement Type"
},
"quantity": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
}
],
"title": "Quantity"
},
"unit_price": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
},
{
"type": "null"
}
],
"title": "Unit Price"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
}
},
"type": "object",
"required": [
"product_id",
"warehouse_id",
"movement_type",
"quantity"
],
"title": "StockMovementCreate"
},
"StockMovementResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"product_id": {
"type": "integer",
"title": "Product Id"
},
"product_sku": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Product Sku"
},
"product_name": {
"type": "string",
"title": "Product Name"
},
"movement_type": {
"type": "string",
"title": "Movement Type"
},
"quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Quantity"
},
"before_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Before Quantity"
},
"after_quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "After Quantity"
},
"reference_no": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reference No"
},
"remark": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Remark"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"product_id",
"product_sku",
"product_name",
"movement_type",
"quantity",
"before_quantity",
"after_quantity",
"reference_no",
"remark",
"created_at"
],
"title": "StockMovementResponse"
},
"SupplierCreate": {
"properties": {
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"contact_person": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Person"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email"
},
"address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Address"
}
},
"type": "object",
"required": [
"name"
],
"title": "SupplierCreate"
},
"SupplierResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"contact_person": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Contact Person"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Phone"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email"
},
"is_active": {
"type": "boolean",
"title": "Is Active"
}
},
"type": "object",
"required": [
"id",
"code",
"name",
"contact_person",
"phone",
"email",
"is_active"
],
"title": "SupplierResponse"
},
"Token": {
"properties": {
"access_token": {
"type": "string",
"title": "Access Token"
},
"token_type": {
"type": "string",
"title": "Token Type"
},
"user": {
"$ref": "#/components/schemas/UserResponse"
}
},
"type": "object",
"required": [
"access_token",
"token_type",
"user"
],
"title": "Token"
},
"ToolSpec": {
"properties": {
"diameter": {
"type": "number",
"title": "Diameter",
"default": 10.0
},
"flute_length": {
"type": "number",
"title": "Flute Length",
"default": 30.0
},
"shank_diameter": {
"type": "number",
"title": "Shank Diameter",
"default": 10.0
}
},
"type": "object",
"title": "ToolSpec"
},
"ToolpathOptimizeRequest": {
"properties": {
"toolpath_points": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array",
"title": "Toolpath Points"
},
"cutting_params": {
"additionalProperties": true,
"type": "object",
"title": "Cutting Params"
},
"stock_bbox": {
"anyOf": [
{
"$ref": "#/components/schemas/BBox3D"
},
{
"type": "null"
}
]
}
},
"type": "object",
"title": "ToolpathOptimizeRequest"
},
"UndercutDetectRequest": {
"properties": {
"task_id": {
"type": "string",
"title": "Task Id"
},
"parting_direction": {
"items": {
"type": "number"
},
"type": "array",
"title": "Parting Direction"
},
"mold_size": {
"$ref": "#/components/schemas/MoldSize"
}
},
"type": "object",
"required": [
"task_id"
],
"title": "UndercutDetectRequest"
},
"UserCreate": {
"properties": {
"username": {
"type": "string",
"title": "Username"
},
"email": {
"type": "string",
"title": "Email"
},
"password": {
"type": "string",
"title": "Password"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Name"
},
"role_ids": {
"items": {
"type": "integer"
},
"type": "array",
"title": "Role Ids",
"default": []
}
},
"type": "object",
"required": [
"username",
"email",
"password"
],
"title": "UserCreate"
},
"UserResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"username": {
"type": "string",
"title": "Username"
},
"email": {
"type": "string",
"title": "Email"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Name"
},
"is_active": {
"type": "boolean",
"title": "Is Active"
},
"is_superuser": {
"type": "boolean",
"title": "Is Superuser",
"default": false
},
"roles": {
"items": {
"type": "string"
},
"type": "array",
"title": "Roles"
}
},
"type": "object",
"required": [
"id",
"username",
"email",
"full_name",
"is_active",
"roles"
],
"title": "UserResponse"
},
"UserUpdate": {
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email"
},
"full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Full Name"
},
"is_active": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Is Active"
},
"role_ids": {
"anyOf": [
{
"items": {
"type": "integer"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Role Ids"
}
},
"type": "object",
"title": "UserUpdate"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
},
"input": {
"title": "Input"
},
"ctx": {
"type": "object",
"title": "Context"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"WarehouseCreate": {
"properties": {
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Address"
},
"manager": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Manager"
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Phone"
}
},
"type": "object",
"required": [
"name"
],
"title": "WarehouseCreate"
},
"WarehouseResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"name": {
"type": "string",
"title": "Name"
},
"address": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Address"
},
"manager": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Manager"
},
"is_active": {
"type": "boolean",
"title": "Is Active"
},
"is_default": {
"type": "boolean",
"title": "Is Default"
}
},
"type": "object",
"required": [
"id",
"code",
"name",
"address",
"manager",
"is_active",
"is_default"
],
"title": "WarehouseResponse"
}
},
"securitySchemes": {
"OAuth2PasswordBearer": {
"type": "oauth2",
"flows": {
"password": {
"scopes": {},
"tokenUrl": "/api/auth/login"
}
}
}
}
}
}