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