- Add database migrations for market_listings, missions and character cosmetics - Create controllers for marketplace, missions, presence and character customization - Implement admin world dashboard with live platform metrics - Add feature tests for world functionality - Include phase 2 design documents and gap analysis
57 lines
1.9 KiB
PHP
Executable File
57 lines
1.9 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Http\Controllers\Web\Admin\AdminWorldController;
|
|
use Illuminate\Console\Command;
|
|
|
|
/**
|
|
* Prints a one-shot world metrics report for operators and CI logs.
|
|
*/
|
|
class CityReport extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'city:report';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Print world metrics (citizens, economy, market, missions)';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*/
|
|
public function handle(): int
|
|
{
|
|
$metrics = app(AdminWorldController::class)->metrics();
|
|
|
|
$this->info('City10 world report');
|
|
$this->line('Users: '.$metrics['users']['total']
|
|
.' (pending '.$metrics['users']['pending']
|
|
.', active '.$metrics['users']['active']
|
|
.', banned '.$metrics['users']['banned'].')');
|
|
$this->line('Cities: '.$metrics['cities']);
|
|
$this->line('Characters: '.$metrics['characters']['total']
|
|
.' (online '.$metrics['characters']['online']
|
|
.', hospital '.$metrics['characters']['hospitalized']
|
|
.', avg health '.$metrics['characters']['avg_health']
|
|
.', money '.$metrics['characters']['total_money'].')');
|
|
$this->line('World: '.$metrics['world']['stores'].' stores, '
|
|
.$metrics['world']['houses_complete'].' houses, '
|
|
.$metrics['world']['jobs'].' jobs, '
|
|
.$metrics['world']['messages'].' messages, '
|
|
.$metrics['world']['transaction_volume'].' coins traded');
|
|
$this->line('Market: '.$metrics['market']['listings'].' active listings');
|
|
$this->line('Missions: '.$metrics['missions']['active'].' active, '
|
|
.$metrics['missions']['completed'].' completed');
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|