2013-11-28 18:40:13 +02:00
|
|
|
<?php
|
|
|
|
|
|
2013-12-04 18:20:14 +02:00
|
|
|
class Invitation extends EntityModel
|
2013-11-28 18:40:13 +02:00
|
|
|
{
|
2015-01-11 13:56:58 +02:00
|
|
|
public function invoice()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('Invoice');
|
|
|
|
|
}
|
2013-12-02 14:22:29 +02:00
|
|
|
|
2015-01-11 13:56:58 +02:00
|
|
|
public function contact()
|
|
|
|
|
{
|
2015-02-10 12:00:59 +02:00
|
|
|
return $this->belongsTo('Contact')->withTrashed();
|
2015-01-11 13:56:58 +02:00
|
|
|
}
|
2013-12-02 14:22:29 +02:00
|
|
|
|
2015-01-11 13:56:58 +02:00
|
|
|
public function user()
|
|
|
|
|
{
|
2015-02-10 12:00:59 +02:00
|
|
|
return $this->belongsTo('User')->withTrashed();
|
2015-01-11 13:56:58 +02:00
|
|
|
}
|
2014-04-23 10:20:01 +03:00
|
|
|
|
2015-02-26 20:47:20 +02:00
|
|
|
public function account()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('Account');
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-11 13:56:58 +02:00
|
|
|
public function getLink()
|
|
|
|
|
{
|
|
|
|
|
return SITE_URL.'/view/'.$this->invitation_key;
|
|
|
|
|
}
|
|
|
|
|
}
|