<?php

namespace App\Models;

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

class Producto extends Model
{
    use HasFactory;

    protected $table = 'productos';

    protected $fillable = [
        'company_id',
        'nombre',
        'precio',
        'descripcion',
        'codigo_barras',
        'foto',
    ];

    public function company()
    {
        return $this->belongsTo(\App\Models\Company::class);
    }
}
