Files
geMoldInsight/openapi.json
T
cjw 483f158424 D17 批 3:前端按钮 + Dialog + 经验角标——闭环可视
让老师傅能用起来:ResultView 加按钮组 + HumanFeedbackDialog 组件 +
经验角标渲染 + 接口变更三件套随批完成,admin / process_engineer 可在
分析结果页标记采纳 / 建议调整 / 拒绝,下次同指纹产品分析自动消费。

变更内容:
- frontend/src/modules/moldinsight/components/HumanFeedbackDialog.vue(new)
  新组件:t-dialog + t-form + t-radio-group 三选一(采纳 / 建议调整 /
  拒绝)+ t-textarea 原因 + t-textarea 调整建议(仅 adjust 模式显隐);
  走 moldinsightApi.submitExperienceFeedback,提交成功后 emit 'submitted'
  让父组件重新拉 hints 刷新角标;表单打开时 watch 重置;loading 态 /
  error 通知复用 shared/notification
- frontend/src/modules/moldinsight/ResultView.vue
  - import moldinsightApi 与 HumanFeedbackDialog
  - state 增加 feedbackDialogVisible / hintsFingerprint / hints
  - Scheme interface 扩展 axis / confidence_score / method 顶层字段
    (前端 TS 类型与后端 Pydantic 字段对齐)
  - computed taskId / hintsByAxis / currentAxisHint(避免 undefined index
    TS 报错)/ canGiveFeedback(is_superuser || roles 含 process_engineer)
  - function loadExperienceHints(onMounted + 提交后各调一次;失败静默
    退化,按钮仍可点)/ openFeedbackDialog / onFeedbackSubmitted
  - 模板:
    * 推荐方案卡片 summary-header 加 t-tag theme="success" variant="light"
      经验角标("📚 历史经验 N 条",title 提示采纳/拒绝计数)
    * export-buttons-bar 加 👍 老师傅反馈 按钮(v-if="canGiveFeedback"
      角色门控;theme="default" size="small" 与既有 6 个 t-button 视觉一致)
    * </t-loading> 之后挂 HumanFeedbackDialog(v-model:visible + 11 个 props
      透传 scheme_id / axis / fingerprint / score_at_submit / 等)
- frontend/src/shared/api-client.ts moldinsightApi 加两个方法:
  getExperienceHints(taskId) / submitExperienceFeedback(taskId, data)
  (返回类型由 openapi-typescript 自动生成,无需手维护)

接口变更三件套随批完成:
- openapi.json 重导出(unified app,含 ExperienceFeedbackCreate /
  ExperienceFeedbackResponse / ExperienceHintItem / ExperienceHintsResponse
  四个新 schema,2 个新 path 出现)
- npm run gen:api 再生 frontend/src/types/api.ts(生成物,禁止手改)
- npm run build 通过(vue-tsc + vite,ResultView 包 37.18 kB / 11.91 kB
  gzip)

- docs/STATUS.md 顶部加 2026-09-24 批 3 日志条目
- docs/TECH_DEBT.md D17 追加批 3 已完成描述 + 缩减剩余工作(仅剩批 4
  按需排期)

设计要点:
- canGiveFeedback 借 (appStore.user as any).roles 临时绕过 AppUser
  类型不含 roles 的限制(前端硬规则:"不要硬编码 'admin' 字符串"——
  按 role.code === 'process_engineer' 匹配)
- currentAxisHint 解决 selectedScheme.axis 可能 undefined 的索引报错
- onFeedbackSubmitted 提交后立即 loadExperienceHints 触发角标刷新,
  实现"写入即消费"前端可见

后端基线:192 passed, 13 skipped(批 3 纯前端,不动后端)。
D17 闭环端到端可用:admin / process_engineer 在 ResultView 点反馈
按钮 → Dialog 提交 → 角标即时刷新 + 下次同指纹产品分析算法加成。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-24 10:03:09 +08:00

9626 lines
237 KiB
JSON

{
"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/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/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"
}
}
}
}
}
}
},
"/api/tasks/{task_id}/experience-feedback": {
"post": {
"summary": "Submit Feedback",
"description": "Ìá½»·½°¸¼¶·´À¡¡£\n\nȨÏÞ£ºµÇ¼Óû§ + ÈÎÎñ¹éÊô + feedback_experience_hint¡£\nдÈëºóÓÉ·ÓÉ commit£¨D9 ±ß½ç£©+ invalidate_task_view£¨task_view 60s TTL ʧЧ£©¡£",
"operationId": "submit_feedback_api_tasks__task_id__experience_feedback_post",
"security": [
{
"OAuth2PasswordBearer": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Task Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExperienceFeedbackCreate"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExperienceFeedbackResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/tasks/{task_id}/experience-hints": {
"get": {
"summary": "Get Experience Hints",
"description": "À­È¡¸ÃÈÎÎñµÄÍ¬Ö¸ÎÆÀúÊ· hints ÕªÒª¡£\n\nȨÏÞ£ºµÇ¼Óû§ + ÈÎÎñ¹éÊô¡£×é֪֯ʶ¶ÔËùÓÐÈ˿ɼû£¨²»ÒªÇó¹¤ÒÕ¹¤³ÌʦȨÏÞ£©¡£",
"operationId": "get_experience_hints_api_tasks__task_id__experience_hints_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": {
"$ref": "#/components/schemas/ExperienceHintsResponse"
}
}
}
},
"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",
"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": [
"½øÏú´æ",
"ÒDZíÅÌ"
],
"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": {
"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"
},
"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": "δÌṩµÄÆ«ºÃ×ֶλØÂäµ½ÈÎÎñ³Ö¾Ã»¯Æ«ºÃ£¬ÔÙ»ØÂ䵽ĬÈÏÖµ¡£"
},
"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"
},
"ExperienceFeedbackCreate": {
"properties": {
"scheme_id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"title": "Scheme Id"
},
"feedback_status": {
"type": "string",
"enum": [
"adopted",
"adjust",
"rejected"
],
"title": "Feedback Status"
},
"feedback_reason": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
],
"title": "Feedback Reason"
},
"adjust_suggestion": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "null"
}
],
"title": "Adjust Suggestion"
},
"confidence_at_submit": {
"anyOf": [
{
"type": "number",
"maximum": 1.0,
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Confidence At Submit"
},
"score_at_submit": {
"anyOf": [
{
"type": "number",
"maximum": 100.0,
"minimum": 0.0
},
{
"type": "null"
}
],
"title": "Score At Submit"
}
},
"type": "object",
"required": [
"scheme_id",
"feedback_status"
],
"title": "ExperienceFeedbackCreate",
"description": "ÀÏʦ¸µ·½°¸¼¶·´À¡ÇëÇóÌå¡£"
},
"ExperienceFeedbackResponse": {
"properties": {
"id": {
"type": "integer",
"title": "Id"
},
"scheme_id": {
"type": "string",
"title": "Scheme Id"
},
"scheme_axis": {
"type": "string",
"title": "Scheme Axis"
},
"feedback_status": {
"type": "string",
"title": "Feedback Status"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"scheme_id",
"scheme_axis",
"feedback_status",
"created_at"
],
"title": "ExperienceFeedbackResponse",
"description": "·´À¡Ð´ÈëÏìÓ¦¡£"
},
"ExperienceHintItem": {
"properties": {
"scheme_axis": {
"type": "string",
"title": "Scheme Axis"
},
"adopted_count": {
"type": "integer",
"title": "Adopted Count"
},
"rejected_count": {
"type": "integer",
"title": "Rejected Count"
},
"adjust_count": {
"type": "integer",
"title": "Adjust Count"
},
"confidence": {
"type": "number",
"title": "Confidence"
},
"weight": {
"type": "number",
"title": "Weight"
},
"sample_count": {
"type": "integer",
"title": "Sample Count"
}
},
"type": "object",
"required": [
"scheme_axis",
"adopted_count",
"rejected_count",
"adjust_count",
"confidence",
"weight",
"sample_count"
],
"title": "ExperienceHintItem",
"description": "Í¬Ö¸ÎÆÀúÊ· hints ÕªÒª£¨°´ scheme_axis ¾ÛºÏ£©¡£"
},
"ExperienceHintsResponse": {
"properties": {
"task_id": {
"type": "string",
"title": "Task Id"
},
"stp_file_id": {
"type": "integer",
"title": "Stp File Id"
},
"material_name": {
"type": "string",
"title": "Material Name"
},
"is_foam": {
"type": "boolean",
"title": "Is Foam"
},
"fingerprint": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Fingerprint"
},
"hints": {
"items": {
"$ref": "#/components/schemas/ExperienceHintItem"
},
"type": "array",
"title": "Hints"
}
},
"type": "object",
"required": [
"task_id",
"stp_file_id",
"material_name",
"is_foam",
"fingerprint",
"hints"
],
"title": "ExperienceHintsResponse",
"description": "GET /experience-hints ÏìÓ¦¡£"
},
"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"
},
"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"
},
"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": "ÎïÁϹ©Ó¦É̹ØÁªµÄÏìӦģÐÍ"
},
"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": "µ¥¸öÎïÁϵIJɹº½¨Òé"
},
"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"
},
"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"
}
}
}
}
}
}