feat: add hotel and vehicle option site modules
Add full support for hotel group and vehicle option site management features: - Define SQLAlchemy models and alembic migration for the new database tables - Add default sample content entries in content.py - Extend admin and public API routes to support the new modules - Update seed script to populate default hotel and vehicle data - Update all relevant documentation and test cases
This commit is contained in:
33
README.md
33
README.md
@@ -85,6 +85,21 @@ python -m app.seed --no-reset
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 4000 --reload
|
||||
```
|
||||
|
||||
如果需要手动重启 4001 端口服务,先释放端口,再重新运行:
|
||||
|
||||
```powershell
|
||||
$port = 4001
|
||||
$listenerPids = Get-NetTCPConnection -LocalPort $port -State Listen -ErrorAction SilentlyContinue |
|
||||
Select-Object -ExpandProperty OwningProcess -Unique
|
||||
foreach ($listenerPid in $listenerPids) {
|
||||
Get-CimInstance Win32_Process |
|
||||
Where-Object { $_.ParentProcessId -eq $listenerPid } |
|
||||
ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }
|
||||
Stop-Process -Id $listenerPid -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 4001 --reload
|
||||
```
|
||||
|
||||
启动后访问:
|
||||
|
||||
- 健康检查:http://localhost:4000/health
|
||||
@@ -141,15 +156,15 @@ python -m app.seed
|
||||
|
||||
## 常用命令
|
||||
|
||||
| 命令 | 说明 |
|
||||
| --- | --- |
|
||||
| `uvicorn app.main:app --reload --port 4000` | 启动开发服务 |
|
||||
| `alembic upgrade head` | 创建或升级数据库结构 |
|
||||
| `alembic stamp head` | 标记已有数据库已处于当前 baseline |
|
||||
| `python -m app.seed` | 重置并导入初始化内容 |
|
||||
| `python -m app.seed --no-reset` | 只确保默认后台账号存在 |
|
||||
| `pytest` | 运行测试 |
|
||||
| `docker compose up --build` | 构建并启动完整服务 |
|
||||
| 命令 | 说明 |
|
||||
| ------------------------------------------- | --------------------------------- |
|
||||
| `uvicorn app.main:app --reload --port 4000` | 启动开发服务 |
|
||||
| `alembic upgrade head` | 创建或升级数据库结构 |
|
||||
| `alembic stamp head` | 标记已有数据库已处于当前 baseline |
|
||||
| `python -m app.seed` | 重置并导入初始化内容 |
|
||||
| `python -m app.seed --no-reset` | 只确保默认后台账号存在 |
|
||||
| `pytest` | 运行测试 |
|
||||
| `docker compose up --build` | 构建并启动完整服务 |
|
||||
|
||||
## API 兼容范围
|
||||
|
||||
|
||||
Reference in New Issue
Block a user