28 lines
509 B
PHP
28 lines
509 B
PHP
|
<?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();
|
||
|
}
|
||
|
}
|