<?php

namespace App\Repositories\Eloquent;

use App\Models\AiReview;
use App\Repositories\Contracts\AiReviewRepositoryInterface;

class AiReviewRepository implements AiReviewRepositoryInterface
{
    public function all() {
        return AiReview::all();
    }

    public function find($id) {
        return AiReview::findOrFail($id);
    }

    public function create(array $data) {
        return AiReview::create($data);
    }

    public function update($id, array $data) {
        $aiReview = AiReview::findOrFail($id);
        $aiReview->update($data);
        return $aiReview;
    }

    public function delete($id) {
        return AiReview::destroy($id);
    }
}