refactor: 使用官方support\Db和support\Model

- 创建 support/Db.php 和 support/Model.php
- 在 bootstrap.php 中自动初始化数据库
- 移除 app/util/Db.php
- 更新所有模型和控制器使用官方类

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-25 18:15:17 +08:00
parent 81cde28aa5
commit 66b61eada4
18 changed files with 115 additions and 88 deletions
+1 -3
View File
@@ -7,7 +7,7 @@ use app\model\ApprovalNode;
use app\model\ApprovalOrder;
use app\model\ApprovalRecord;
use app\model\User;
use app\util\Db;
use support\Db;
use Illuminate\Database\Connection;
class ApprovalService
@@ -16,8 +16,6 @@ class ApprovalService
public function __construct()
{
// Initialize database if not already initialized
Db::init();
$this->db = Db::connection();
}