Files
unified-restaurant-original/backend/app/Models/CompraIngrediente.php
2021-07-14 03:58:17 -04:00

24 lines
594 B
PHP

<?php
namespace App\Models;
use App\Traits\UuidPrimaryKey;
use App\Exceptions\ModelNotFoundException;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CompraIngrediente extends Model {
use UuidPrimaryKey, SoftDeletes;
protected $table = 'compra_ingredientes';
protected $fillable = ['id', 'unidades', 'monto_unitario', 'compra_id', 'ingrediente_id'];
public function ingrediente() {
return $this->belongsTo(Ingrediente::class);
}
public function compra() {
return $this->belongsTo(Compra::class);
}
}