<?php

namespace App\Models;

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

class Carrinho extends Model
{
    use HasFactory;
    use SoftDeletes;
    protected $table="carrinhos";
    protected $dates = ['deleted_at'];
    protected $fillable = ['caixa_id','usuario_id'];


    public function getCaixa()
    {
        return $this->belongsTo(Caixa::class,'caixa_id','id');
    }
     public function getUser()
    {
        return $this->belongsTo(User::class, 'usuario_id', 'id');
    }
}
