chore: init saasshop repo + sql migrations runner + gitee go
This commit is contained in:
60
docs/API_BASELINE.md
Normal file
60
docs/API_BASELINE.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# API 基础规范(当前版本)
|
||||
|
||||
## 基础前缀
|
||||
- `/api/v1`
|
||||
|
||||
## 当前接口
|
||||
### 系统
|
||||
- `GET /api/v1/ping`
|
||||
- `GET /api/v1/platforms`
|
||||
|
||||
### 认证
|
||||
- `POST /api/v1/auth/login`
|
||||
- `POST /api/v1/auth/channel-login`
|
||||
|
||||
### 商品
|
||||
- `GET /api/v1/products`
|
||||
- `GET /api/v1/products/{id}`
|
||||
|
||||
### 订单
|
||||
- `GET /api/v1/orders`
|
||||
- `POST /api/v1/orders`
|
||||
|
||||
## 统一返回结构
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "ok",
|
||||
"data": {},
|
||||
"server_time": "2026-03-08 13:00:00"
|
||||
}
|
||||
```
|
||||
|
||||
## 多端预留字段
|
||||
### users
|
||||
- `register_source`
|
||||
- `last_login_source`
|
||||
- `wechat_openid`
|
||||
- `wechat_unionid`
|
||||
- `mini_openid`
|
||||
|
||||
### orders
|
||||
- `platform`
|
||||
- `payment_channel`
|
||||
- `payment_status`
|
||||
- `device_type`
|
||||
|
||||
### oauth_accounts
|
||||
- `platform`
|
||||
- `provider`
|
||||
- `openid`
|
||||
- `unionid`
|
||||
- `app_id`
|
||||
- `raw_payload`
|
||||
|
||||
## 支持方向
|
||||
- PC
|
||||
- H5
|
||||
- 微信公众号
|
||||
- 微信小程序
|
||||
- APP(预留 API 层)
|
||||
Reference in New Issue
Block a user