<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Proveedor extends Model
{
    protected $table = 'Proveedor';
    protected $primaryKey = 'id_proveedor';
    public $timestamps = false;

    protected $fillable = [
        'rFCEmisor',
        'nmbEmisor',
        'email',
        'regimenFiscal',
        'password',
        'template',
        'certificado',
        'noCertificado',
        'keypem',
        'keyCancel',
        'imagen',
        'asociado',
        'multicers',
        'registroProF',
        'premium',
        'lastRequest',
        'authomaticDownload',
        'tipoLicencia',
        'status',
    ];

    public function certificadoFiel(): HasOne
    {
        return $this->hasOne(CertificadoFIEL::class, 'id_proveedor', 'id_proveedor');
    }
}
