Modelo de base de datos en lumen
This commit is contained in:
21
backend/app/Models/CompraIngrediente.php
Normal file
21
backend/app/Models/CompraIngrediente.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\UuidPrimaryKey;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class CompraIngrediente extends Model {
|
||||
use UuidPrimaryKey, SoftDeletes;
|
||||
|
||||
protected $table = 'compra_ingredientes';
|
||||
|
||||
public function ingrediente() {
|
||||
return $this->belongsTo(Ingrediente::class);
|
||||
}
|
||||
|
||||
public function compra() {
|
||||
return $this->belongsTo(Compra::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user