mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 09:34:10 -08:00
28 lines
543 B
PHP
28 lines
543 B
PHP
|
<?php
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class ConsumableAssignment extends Model
|
||
|
{
|
||
|
use CompanyableTrait;
|
||
|
|
||
|
protected $dates = ['deleted_at'];
|
||
|
protected $table = 'consumables_users';
|
||
|
|
||
|
public function consumable()
|
||
|
{
|
||
|
return $this->belongsTo('\App\Models\Consumable');
|
||
|
}
|
||
|
|
||
|
public function user()
|
||
|
{
|
||
|
return $this->belongsTo('\App\Models\User', 'assigned_to');
|
||
|
}
|
||
|
|
||
|
public function admin()
|
||
|
{
|
||
|
return $this->belongsTo('\App\Models\User', 'user_id');
|
||
|
}
|
||
|
}
|