<?php

namespace App\Models;

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

class Caixa extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $table="caixas";
    protected $dates = ['deleted_at'];
    protected $fillable = ['numerodacaixa','reserva_id','usuario_id'];


    public function getReserva()
    {
        return $this->belongsTo(Reserva::class,'reserva_id','id');
    }
    
    public function getUser()
    {
        return $this->belongsTo(User::class,'usuario_id','id');
    }


    public function getEtiquetas()
    {
        return $this->hasOne(Etiqueta::class);
    }

    
    public function getArrumacao()
    {
        return $this->hasOne(ArrumacaoModel::class);
    }
}
