Nuevo models
This commit is contained in:
27
src/nuevo/Venta/Premio.php
Normal file
27
src/nuevo/Venta/Premio.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Incoviba\nuevo\Venta;
|
||||
|
||||
use Incoviba\Common\Alias\NewModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Aldarien
|
||||
* @property int id
|
||||
* @property Venta venta_id
|
||||
* @property TipoPremio tipo_id
|
||||
* @property double valor
|
||||
*
|
||||
*/
|
||||
class Premio extends NewModel
|
||||
{
|
||||
protected static $_table = 'premios';
|
||||
|
||||
public function venta()
|
||||
{
|
||||
return $this->belongsTo(Venta::class, 'venta_id')->findOne();
|
||||
}
|
||||
public function tipo()
|
||||
{
|
||||
return $this->belongsTo(TipoPremio::class, 'tipo_id')->findOne();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user