Modelo de base de datos en lumen
This commit is contained in:
29
backend/app/Models/Venta.php
Normal file
29
backend/app/Models/Venta.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\UuidPrimaryKey;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Venta extends Model {
|
||||
use UuidPrimaryKey, SoftDeletes;
|
||||
|
||||
protected $table = 'ventas';
|
||||
|
||||
public function mesero() {
|
||||
return $this->belongsTo(Mesero::class);
|
||||
}
|
||||
|
||||
public function canal() {
|
||||
return $this->belongsTo(CanalVenta::class);
|
||||
}
|
||||
|
||||
public function restaurante() {
|
||||
return $this->belongsTo(Restaurante::class);
|
||||
}
|
||||
|
||||
public function productos() {
|
||||
return $this->hasMany(VentaProducto::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user