You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
797 B
34 lines
797 B
<?php
|
|
|
|
namespace App\Entities\Subscriptions;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Laracasts\Presenter\PresentableTrait;
|
|
|
|
class Subscription extends Model
|
|
{
|
|
use PresentableTrait;
|
|
|
|
protected $presenter = 'App\Entities\Subscriptions\SubscriptionPresenter';
|
|
protected $guarded = ['id', 'created_at', 'updated_at'];
|
|
|
|
public function project()
|
|
{
|
|
return $this->belongsTo('App\Entities\Projects\Project');
|
|
}
|
|
|
|
public function customer()
|
|
{
|
|
return $this->belongsTo('App\Entities\Partners\Customer');
|
|
}
|
|
|
|
public function vendor()
|
|
{
|
|
return $this->belongsTo('App\Entities\Partners\Vendor', 'vendor_id');
|
|
}
|
|
|
|
public function status()
|
|
{
|
|
return $this->status_id ? trans('app.active') : trans('app.in_active');
|
|
}
|
|
}
|