<?php

namespace App\Http\Controllers\Api\System;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\ContentModerationLog;

class ContentModerationController extends Controller
{
    public function index()
    {
        return ContentModerationLog::latest()->paginate(10);
    }

    public function store(Request $request)
    {
        $data = $request->validate([
            'content_type' => 'required',
            'content_id' => 'required',
            'action' => 'required'
        ]);

        $data['moderator_id'] = auth()->id();

        return ContentModerationLog::create($data);
    }
}