1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +01:00
invoiceninja/app/Models/CompanyToken.php

53 lines
971 B
PHP
Raw Normal View History

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) 2020. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
* @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',
];
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()
{
return $this->belongsTo(User::class);
2019-03-26 05:46:08 +01:00
}
public function company()
{
return $this->belongsTo(Company::class);
2019-03-26 05:46:08 +01:00
}
}