<?php

namespace App\Models;

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

class Bug extends Model
{
    use HasFactory;

    protected $table = 'bugs';

    protected $fillable = [
        'titulo',
        'descripcion',
        'prioridad',
        'estado',
        'version',
        'fotobug_id',
    ];

    public function fotoBug()
    {
        return $this->belongsTo(FotoBug::class, 'fotobug_id', 'id');
    }
}
