<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Response;

abstract class ResourceController extends Controller
{
    public function index(): JsonResponse
    {
        return response()->json(['data' => []]);
    }

    public function store(): JsonResponse
    {
        return response()->json(['data' => []], 201);
    }

    public function show(string $id): JsonResponse
    {
        return response()->json(['data' => ['id' => $id]]);
    }

    public function update(string $id): JsonResponse
    {
        return response()->json(['data' => ['id' => $id]]);
    }

    public function destroy(string $id): Response
    {
        return response()->noContent();
    }
}
