2019-03-26 05:46:08 +01:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
2019-03-26 05:46:08 +01:00
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
2019-05-01 04:23:13 +02:00
|
|
|
class CompanyToken extends Model
|
2019-03-26 05:46:08 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $timestamps = false;
|
|
|
|
|
2019-03-26 22:17:28 +01:00
|
|
|
protected $guarded = [
|
|
|
|
'id',
|
|
|
|
];
|
2019-03-26 05:46:08 +01:00
|
|
|
|
2019-04-25 12:21:07 +02:00
|
|
|
protected $with = [
|
|
|
|
// 'user',
|
|
|
|
// 'company',
|
|
|
|
];
|
|
|
|
|
2019-09-26 00:27:26 +02:00
|
|
|
protected $casts = [
|
|
|
|
'updated_at' => 'timestamp',
|
|
|
|
'created_at' => 'timestamp',
|
|
|
|
'deleted_at' => 'timestamp',
|
|
|
|
];
|
|
|
|
|
2019-03-26 05:46:08 +01:00
|
|
|
public function account()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Account::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
{
|
2019-12-30 22:59:12 +01:00
|
|
|
return $this->belongsTo(User::class);
|
2019-03-26 05:46:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function company()
|
|
|
|
{
|
2019-12-30 22:59:12 +01:00
|
|
|
return $this->belongsTo(Company::class);
|
2019-03-26 05:46:08 +01:00
|
|
|
}
|
|
|
|
}
|