From 2adbac4ab49af62935682244f22754cfe9bdec58 Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Tue, 1 Jul 2025 14:21:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AA=BF=E6=95=B4=20=E5=88=86=E5=BA=97?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=2020250701=20=E4=B8=8D=E5=9C=A8=E5=90=8C?= =?UTF-8?q?=E6=AD=A9=E5=8C=85=E5=BB=82=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/ExportSqliteBranchJob.php | 33 ------------------------------ 1 file changed, 33 deletions(-) diff --git a/app/Jobs/ExportSqliteBranchJob.php b/app/Jobs/ExportSqliteBranchJob.php index 99dc52f..fc3c8b6 100644 --- a/app/Jobs/ExportSqliteBranchJob.php +++ b/app/Jobs/ExportSqliteBranchJob.php @@ -3,7 +3,6 @@ namespace App\Jobs; use App\Models\Branch; -use App\Models\Room; use App\Services\SqliteExportService; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; @@ -62,38 +61,6 @@ class ExportSqliteBranchJob implements ShouldQueue 'created_at' => $branch->created_at, 'updated_at' => $branch->updated_at, ], - ], - 'rooms' => [ - 'query' => fn () => Room::where('branch_id', $this->branchId), - 'tableSchema' => function ($table) { - $table->id(); - $table->unsignedBigInteger('branch_id')->comment('關聯分店'); - $table->unsignedTinyInteger('floor')->default(1)->comment('樓層'); - $table->string('type')->default('unset')->comment('包廂類別'); // enum 改成 string - $table->string('name')->comment('包廂名稱'); - $table->string('internal_ip')->nullable()->comment('內部 IP'); - $table->unsignedSmallInteger('port')->nullable()->comment('通訊 Port'); - $table->tinyInteger('is_online')->default(0)->comment('連線狀態'); - $table->string('status')->default('error')->comment('狀態'); // enum 改成 string - $table->dateTime('started_at')->nullable()->comment('開始時間'); - $table->dateTime('ended_at')->nullable()->comment('結束時間'); - $table->timestamps(); - }, - 'transformer' => fn ($room) => [ - 'id' => $room->id, - 'branch_id' => $room->branch_id, - 'floor' => $room->floor, - 'type' => $room->type, - 'name' => $room->name, - 'internal_ip' => $room->internal_ip, - 'port' => $room->port, - 'is_online' => $room->is_online, - 'status' => $room->status, - 'started_at' => $room->started_at, - 'ended_at' => $room->ended_at, - 'created_at' => $room->created_at, - 'updated_at' => $room->updated_at, - ], ] ]); SendSqliteFileJob::dispatch($sqlitePath, $this->branchId);