<?php

use Illuminate\Support\Facades\Route;
use Kylin\Guardian\Http\Controllers\GuardianController;

Route::prefix('kylin/guardian')->middleware('auth:sanctum')->group(function () {
    // 监护人注册
    Route::post('/register', [GuardianController::class, 'register']);

    // 绑定/解绑未成年人
    Route::post('/bind', [GuardianController::class, 'bind']);
    Route::post('/unbind/{bindingId}', [GuardianController::class, 'unbind']);

    // 绑定列表
    Route::get('/bindings', [GuardianController::class, 'bindings']);

    // 未成年人游戏报告
    Route::get('/binding/{bindingId}/report', [GuardianController::class, 'report']);

    // 设置限制
    Route::post('/binding/{bindingId}/set-play-limit', [GuardianController::class, 'setPlayLimit']);
    Route::post('/binding/{bindingId}/set-spending-limit', [GuardianController::class, 'setSpendingLimit']);

    // 上线/下线管控
    Route::post('/binding/{bindingId}/force-offline', [GuardianController::class, 'forceOffline']);
    Route::post('/binding/{bindingId}/allow-online', [GuardianController::class, 'allowOnline']);

    // 远程配置
    Route::get('/binding/{bindingId}/remote-config', [GuardianController::class, 'remoteConfig']);
});
