<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class Product extends Model
{
    use HasTranslations, HasFactory;

    protected $table = "product";
    protected $hidden = ["created_at", "updated_at"];
    protected $guarded = [];

    public $translatable = ["name", "description"];

    public function category()
    {
        return $this->belongsTo(Category::class);
    }
}
