Appearance
创建项目 API
| Path | Method | Created At |
|---|---|---|
| /api/projects/create | POST | 2025-11-29 00:39:11 |
Request
| Key | Rule | Description |
|---|---|---|
| name | string,max:64 | 项目名称不能超过64个字符 |
| customer_id | string,size:24 | 客户不存在 |
| contract_id | string,size:24 | 合同不存在 |
| type | in:COMPLETED_WITHOUT_SERVICE,COMPLETED_WITH_SERVICE,DELIVERY_SIGNED_ONLY,INTEGRATION_WITHOUT_ACCEPTANCE,INTEGRATION_WITH_ACCEPTANCE | 项目类型不正确 |
| total_amount | decimal:0,2,min:0.0000 | 项目金额格式错误 |
| sales_leader_id | integer,min:0 | 销售经理不存在 |
| tech_leader_id | integer,min:0 | 技术经理不存在 |
| project_stage | in:STARTED,PARTIALLY_DELIVERED,ALL_DELIVERED,IMPLEMENTED,INITIAL_ACCEPTANCE,FINAL_ACCEPTANCE | 项目阶段错误 |
| delivery_date | date_format:Y-m-d | 发货时间格式错误 |
| is_signed | App\Rules\BoolRule | 是否终验字段错误 |
| duration | string,max:100 | 项目用时不能超过100个字符 |
| work_hours | string,max:100 | 项目工时不能超过100个字符 |
| agent_id | string,size:24 | 渠道编号格式不正确 |
| status | in:PROCESSING,EXCEPTED,COMPLETED | 项目状态错误 |
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;
}