refactor: fix directory structure and namespaces for webman conventions

- Rename directories to lowercase: Controller→controller, Model→model, Service→service, Util→util, Bootstrap→bootstrap
- Update all namespaces from App\Xxx to app\xxx (webman convention)
- Update all import statements across the codebase
- Update route.php to use lowercase namespaces
- Remove unused CompanyFeishuApp model
- Comment out unimplemented controller routes

Following webman 2.x framework conventions:
- Models: app\model\{ClassName}
- Controllers: app\controller\{ClassName}
- Services: app\service\{ClassName}
- Utils: app\util\{ClassName}
- Middleware: app\middleware\{ClassName}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-24 18:28:23 +08:00
parent 423a04a610
commit 8629f4a4ce
20 changed files with 55 additions and 341 deletions
+62
View File
@@ -0,0 +1,62 @@
<?php
namespace app\controller;
use Webman\Http\Request;
use Webman\Http\Response;
class UserController extends BaseController
{
/**
* 获取用户信息
*/
public function info(Request $request): Response
{
$userId = $this->getUserId($request);
// TODO: 从数据库获取用户信息
return $this->success([
'id' => $userId,
'name' => '测试用户',
'email' => 'test@example.com',
'company_id' => 1,
]);
}
/**
* 获取用户菜单权限
*/
public function menu(Request $request): Response
{
// TODO: 根据用户权限返回菜单
return $this->success([
['id' => 1, 'name' => '首页', 'path' => '/dashboard'],
['id' => 2, 'name' => '出差审批', 'path' => '/business-trip'],
]);
}
/**
* 获取用户可切换的公司列表
*/
public function companies(Request $request): Response
{
$userId = $this->getUserId($request);
// TODO: 从数据库获取用户关联的公司列表
return $this->success([
['id' => 1, 'name' => '公司A'],
]);
}
/**
* 切换当前公司
*/
public function switchCompany(Request $request): Response
{
$companyId = $request->post('company_id');
// TODO: 更新用户当前公司
return $this->success();
}
}