45 lines
893 B
PHP
45 lines
893 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property integer $id
|
|
* @property integer $product_id
|
|
* @property string $evaluation
|
|
* @property string $aspect
|
|
* @property string $taste
|
|
* @property string $odor
|
|
* @property string $texture
|
|
* @property string $created_at
|
|
* @property string $updated_at
|
|
* @property Product $product
|
|
*/
|
|
class ProductComment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'product_id',
|
|
'evaluation',
|
|
'aspect',
|
|
'taste',
|
|
'odor',
|
|
'texture',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function product()
|
|
{
|
|
return $this->belongsTo('App\Models\Product');
|
|
}
|
|
}
|