<?php

use Illuminate\Support\Facades\Route;
use Kylin\AntiAddiction\Http\Controllers\AntiAddictionController;

Route::prefix('kylin/anti-addiction')->group(function () {
    // 需要认证的接口
    Route::middleware('auth:sanctum')->group(function () {
        Route::get('/check', [AntiAddictionController::class, 'check']);
        Route::post('/heartbeat', [AntiAddictionController::class, 'heartbeat']);
        Route::post('/spending-check', [AntiAddictionController::class, 'spendingCheck']);
        Route::post('/record-spending', [AntiAddictionController::class, 'recordSpending']);
        Route::post('/real-name-verify', [AntiAddictionController::class, 'realNameVerify']);
        Route::post('/face-verify', [AntiAddictionController::class, 'faceVerify']);
        Route::post('/analyze-behavior', [AntiAddictionController::class, 'analyzeBehavior']);
        Route::get('/records', [AntiAddictionController::class, 'records']);
    });

    // 公开接口
    Route::get('/holidays', [AntiAddictionController::class, 'holidays']);
});
