feat: enhance player authentication and agent management features
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
- Updated AGENTS.md to clarify player interface bindings and agent account restrictions. - Improved PlayerAuthLoginController to include captcha verification for player login. - Enhanced AdminPlayerIndexController with permission checks for admin users. - Refactored AdminPlayerStoreController to enforce agent node restrictions for non-super admins. - Introduced new error codes for player authentication failures and updated related services. - Enhanced validation rules for agent profiles to include settlement cycle options. - Improved AdminCaptchaService to support separate scopes for admin and player captcha handling. - Updated various services to ensure proper credit management and settlement processes.
This commit is contained in:
@@ -5,6 +5,7 @@ use App\Models\Player;
|
||||
use App\Models\AdminUser;
|
||||
use App\Models\TicketItem;
|
||||
use App\Models\TicketOrder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
@@ -12,8 +13,10 @@ uses(RefreshDatabase::class);
|
||||
|
||||
test('dashboard analytics returns summary trend and play breakdown for period', function (): void {
|
||||
$this->artisan('lottery:admin-auth-sync')->assertExitCode(0);
|
||||
$siteCode = (string) DB::table('admin_sites')->where('is_default', true)->value('code');
|
||||
$businessDate = now()->subDays(3)->toDateString();
|
||||
$player = Player::query()->create([
|
||||
'site_code' => 'main',
|
||||
'site_code' => $siteCode !== '' ? $siteCode : 'default_site',
|
||||
'site_player_id' => 'da-p1',
|
||||
'username' => 'da_u1',
|
||||
'nickname' => null,
|
||||
@@ -23,7 +26,7 @@ test('dashboard analytics returns summary trend and play breakdown for period',
|
||||
|
||||
$draw = Draw::query()->create([
|
||||
'draw_no' => '20260510-001',
|
||||
'business_date' => '2026-05-10',
|
||||
'business_date' => $businessDate,
|
||||
'sequence_no' => 1,
|
||||
'status' => 'settled',
|
||||
'start_time' => now()->subDay(),
|
||||
|
||||
Reference in New Issue
Block a user