mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
36 lines
796 B
PHP
36 lines
796 B
PHP
|
<?php
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
||
|
class LicenseSeat extends Model implements ICompanyableChild
|
||
|
{
|
||
|
use CompanyableChildTrait;
|
||
|
use SoftDeletes;
|
||
|
|
||
|
protected $dates = ['deleted_at'];
|
||
|
protected $guarded = 'id';
|
||
|
protected $table = 'license_seats';
|
||
|
|
||
|
public function getCompanyableParents()
|
||
|
{
|
||
|
return ['asset', 'license'];
|
||
|
}
|
||
|
|
||
|
public function license()
|
||
|
{
|
||
|
return $this->belongsTo('\App\Models\License', 'license_id');
|
||
|
}
|
||
|
|
||
|
public function user()
|
||
|
{
|
||
|
return $this->belongsTo('\App\Models\User', 'assigned_to')->withTrashed();
|
||
|
}
|
||
|
|
||
|
public function asset()
|
||
|
{
|
||
|
return $this->belongsTo('\App\Models\Asset', 'asset_id')->withTrashed();
|
||
|
}
|
||
|
}
|