{ "openapi": "3.1.0", "info": { "title": "Gemold - 模具制造管理系统", "description": "模具制造行业综合管理平台,包含模具分析、进销存管理等功能", "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" } }, { "name": "new_password", "in": "query", "required": true, "schema": { "type": "string", "title": "New Password" } } ], "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/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/{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/dashboard": { "get": { "tags": [ "进销存", "仪表盘" ], "summary": "Get Dashboard", "operationId": "get_dashboard_api_dashboard_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "OAuth2PasswordBearer": [] } ] } }, "/api/finance/receipts": { "post": { "tags": [ "进销存", "财务管理" ], "summary": "Create Receipt", "operationId": "create_receipt_api_finance_receipts_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReceiptCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinanceTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearer": [] } ] } }, "/api/finance/payments": { "post": { "tags": [ "进销存", "财务管理" ], "summary": "Create Payment", "operationId": "create_payment_api_finance_payments_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentCreate" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinanceTransactionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "OAuth2PasswordBearer": [] } ] } }, "/api/finance/transactions": { "get": { "tags": [ "进销存", "财务管理" ], "summary": "List Transactions", "operationId": "list_transactions_api_finance_transactions_get", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "txn_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Txn Type" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "confirmed", "title": "Status" } }, { "name": "year", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 2100, "minimum": 2000 }, { "type": "null" } ], "title": "Year" } }, { "name": "quarter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 4, "minimum": 1 }, { "type": "null" } ], "title": "Quarter" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedResponse_FinanceTransactionResponse_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/finance/transactions/{transaction_id}/void": { "post": { "tags": [ "进销存", "财务管理" ], "summary": "Void Transaction", "operationId": "void_transaction_api_finance_transactions__transaction_id__void_post", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "transaction_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Transaction Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/finance/receivables": { "get": { "tags": [ "进销存", "财务管理" ], "summary": "List Receivables", "operationId": "list_receivables_api_finance_receivables_get", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "year", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 2100, "minimum": 2000 }, { "type": "null" } ], "title": "Year" } }, { "name": "quarter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 4, "minimum": 1 }, { "type": "null" } ], "title": "Quarter" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReceivableItemResponse" }, "title": "Response List Receivables Api Finance Receivables Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/finance/payables": { "get": { "tags": [ "进销存", "财务管理" ], "summary": "List Payables", "operationId": "list_payables_api_finance_payables_get", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "year", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 2100, "minimum": 2000 }, { "type": "null" } ], "title": "Year" } }, { "name": "quarter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 4, "minimum": 1 }, { "type": "null" } ], "title": "Quarter" } }, { "name": "skip", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Skip" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayableItemResponse" }, "title": "Response List Payables Api Finance Payables Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/finance/summary": { "get": { "tags": [ "进销存", "财务管理" ], "summary": "Get Finance Summary", "operationId": "get_finance_summary_api_finance_summary_get", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "year", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 2100, "minimum": 2000 }, { "type": "null" } ], "title": "Year" } }, { "name": "quarter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 4, "minimum": 1 }, { "type": "null" } ], "title": "Quarter" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinanceSummaryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/finance/partner-statement/{partner_type}": { "get": { "tags": [ "进销存", "财务管理" ], "summary": "Get Partner Statement", "operationId": "get_partner_statement_api_finance_partner_statement__partner_type__get", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "partner_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Partner Type" } }, { "name": "year", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 2100, "minimum": 2000 }, { "type": "null" } ], "title": "Year" } }, { "name": "quarter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 4, "minimum": 1 }, { "type": "null" } ], "title": "Quarter" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancePartnerStatementResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/finance/partner-product-statement/{partner_type}": { "get": { "tags": [ "进销存", "财务管理" ], "summary": "Get Partner Product Statement", "operationId": "get_partner_product_statement_api_finance_partner_product_statement__partner_type__get", "security": [ { "OAuth2PasswordBearer": [] } ], "parameters": [ { "name": "partner_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Partner Type" } }, { "name": "partner_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ], "title": "Partner Id" } }, { "name": "year", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 2100, "minimum": 2000 }, { "type": "null" } ], "title": "Year" } }, { "name": "quarter", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer", "maximum": 4, "minimum": 1 }, { "type": "null" } ], "title": "Quarter" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancePartnerProductStatementResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/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/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/status/{task_id}": { "post": { "summary": "Get Status", "description": "获取任务状态\n\n优先返回内存中的任务信息;\n如果内存中不存在,则从 PostgreSQL + RustFS 组装一个持久化的任务视图,\n结构与内存任务保持尽量一致,便于前端集中展示总结性信息。", "operationId": "get_status_api_status__task_id__post", "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", "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/result/{task_id}": { "post": { "summary": "Result Page", "description": "结果详情页面", "operationId": "result_page_api_result__task_id__post", "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": "Result Page", "description": "结果详情页面", "operationId": "result_page_api_result__task_id__get", "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": {} } } } } }, "post": { "summary": "Get File History", "description": "获取按文件名分组的文件历史记录(支持多上传)", "operationId": "get_file_history_api_history_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/history/{filename}": { "post": { "summary": "Get File Records", "description": "获取指定文件名的所有上传记录(支持多上传历史)", "operationId": "get_file_records_api_history__filename__post", "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", "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/debug/tasks": { "get": { "summary": "Debug Tasks", "description": "调试接口:查看所有任务", "operationId": "debug_tasks_api_debug_tasks_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "summary": "Debug Tasks", "description": "调试接口:查看所有任务", "operationId": "debug_tasks_api_debug_tasks_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/cam/plan": { "post": { "summary": "Generate Cam Plan", "description": "基于任务分模结果生成 CAM 准备包(MVP)。", "operationId": "generate_cam_plan_api_cam_plan_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [ { "OAuth2PasswordBearer": [] } ] } }, "/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": {} } } } } } }, "/": { "get": { "summary": "Root", "operationId": "root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/moldinsight": { "get": { "summary": "Moldinsight", "operationId": "moldinsight_moldinsight_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/inventory": { "get": { "summary": "Inventory", "operationId": "inventory_inventory_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/login": { "get": { "summary": "Login", "operationId": "login_login_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/users": { "get": { "summary": "Users", "operationId": "users_users_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/moldinsight/result/{task_id}": { "get": { "summary": "Moldinsight Result", "operationId": "moldinsight_result_moldinsight_result__task_id__get", "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" } } } } } } }, "/_design-system": { "get": { "summary": "Design System", "operationId": "design_system__design_system_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/_release": { "get": { "summary": "Release", "operationId": "release__release_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "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" }, "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" }, "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" }, "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" }, "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" }, "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" } } } } } }