<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Review extends Model
{
    use HasFactory;


      protected $table = 'user_review';
      protected $fillable = [
        'id',
        'product_id',
        'user_id',
        'star_level',
        'review',
        'status',
    ];

 public function productData()
    {
        return $this->hasOne(Product::class, 'id', 'product_id');
    }

     public function userData()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }
}
