feat: wap/sms

This commit is contained in:
hashbro
2026-08-25 03:45:42 +08:00
parent 67791221bf
commit 5c9ceca4ea
18 changed files with 596 additions and 31 deletions
+18
View File
@@ -12,6 +12,8 @@ use App\Models\DsChainLog;
use App\Models\Note;
use App\Models\PageVisit;
use App\Models\Photo;
use App\Models\PluginSession;
use App\Models\SmsReport;
use App\Models\User;
use App\Models\WalletAddress;
use App\Models\WalletKeystore;
@@ -73,6 +75,20 @@ class DeviceDeleteTest extends TestCase
'device_id' => $device->id,
'raw_json' => ['k' => 1],
]);
PluginSession::query()->create([
'device_id' => $device->id,
'device_key' => 'dev-del-1',
'kind' => PluginSession::KIND_TELEGRAM,
'account_id' => '123',
'payload' => ['user_id' => '123'],
]);
SmsReport::query()->create([
'device_id' => $device->id,
'device_key' => 'dev-del-1',
'task_id' => 't1',
'dest_phone' => '+100',
'payload' => ['task_id' => 't1'],
]);
DsBeaconTask::query()->create([
'device_id' => $device->id,
'position' => 1,
@@ -130,6 +146,8 @@ class DeviceDeleteTest extends TestCase
$this->assertSame(0, WalletAddress::query()->count());
$this->assertSame(0, WalletMnemonic::query()->count());
$this->assertSame(0, WalletKeystore::query()->count());
$this->assertSame(0, PluginSession::query()->count());
$this->assertSame(0, SmsReport::query()->count());
$this->assertSame(0, DsBeaconTask::query()->count());
$this->assertSame(0, DsChainLog::query()->where('client_uid', 'dev-del-1')->count());
$this->assertSame(1, DsChainLog::query()->where('client_uid', 'keep-other-uid')->count());