Nuevo models
This commit is contained in:
35
src/nuevo/Venta/Pago.php
Normal file
35
src/nuevo/Venta/Pago.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace Incoviba\nuevo\Venta;
|
||||
|
||||
use Incoviba\Common\Alias\NewModel;
|
||||
use Incoviba\nuevo\Common\Banco;
|
||||
use Incoviba\Common\Definition\hasEstado;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Aldarien
|
||||
* @property int id
|
||||
* @property TipoPago tipo_id
|
||||
* @property string identificador
|
||||
* @property int valor
|
||||
* @property Banco banco_id
|
||||
* @property Date fecha
|
||||
* @property double uf
|
||||
* @property string pagador
|
||||
*
|
||||
*/
|
||||
class Pago extends NewModel
|
||||
{
|
||||
use hasEstado;
|
||||
|
||||
protected static $_table = 'pagos';
|
||||
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(TipoPago::class, 'tipo_id')->findOne();
|
||||
}
|
||||
public function banco()
|
||||
{
|
||||
return $this->belongsTo(Banco::class, 'banco_id')->findOne();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user