LicenseSeat.php
Go to the documentation of this file.
1 <?php
2 namespace App\Models;
3 
6 
7 class LicenseSeat extends Model implements ICompanyableChild
8 {
10  use SoftDeletes;
11 
12  protected $dates = ['deleted_at'];
13  protected $guarded = 'id';
14  protected $table = 'license_seats';
15 
16  public function getCompanyableParents()
17  {
18  return ['asset', 'license'];
19  }
20 
21  public function license()
22  {
23  return $this->belongsTo('\App\Models\License', 'license_id');
24  }
25 
26  public function user()
27  {
28  return $this->belongsTo('\App\Models\User', 'assigned_to')->withTrashed();
29  }
30 
31  public function asset()
32  {
33  return $this->belongsTo('\App\Models\Asset', 'asset_id')->withTrashed();
34  }
35 }