1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Models/TicketRelation.php
2019-01-30 22:25:07 +11:00

37 lines
586 B
PHP

<?php
namespace App\Models;
/**
* Class TicketRelation
* @package App\Models
*/
class TicketRelation extends EntityModel
{
public $timestamps = false;
protected $hidden = [];
/**
* @return mixed
*/
public function getEntityType()
{
return ENTITY_TICKET_RELATION;
}
/**
* @return mixed
*/
public function getEntity()
{
return $this->belongsTo('App\Models\\'.ucfirst($this->entity), 'entity_id', 'id');
}
public function ticket()
{
return $this->belongsTo('App\Models\Ticket');
}
}