Appearance
创建部门 API
| Path | Method | Created At |
|---|---|---|
| /api/customers/departments/create/ | POST | 2025-11-29 00:39:11 |
Request
| Key | Rule | Description |
|---|---|---|
| customerId | string,size:24 | trans:validate.CUSTOMER_NOT_FOUND |
| pid | uuid | 上级部门不存在 |
| name | string,max:32 | 部门名称不能超过32个字符 |
| manager_id | uuid | 负责人ID |
Response
| Key | Type | Example | Comment |
|---|---|---|---|
| code | int | 0 | 编号:0表示成功,非0表示错误 |
| message | string | success | 成功为 success, 失败则错误消息 |
TypeScript Result Example:
TypeScript
interface Result {
/** 编号:0表示成功,非0表示错误 */
code: number;
/** 成功为 success, 失败则错误消息 */
message: string;
}