1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Models/GroupSetting.php

48 lines
949 B
PHP
Raw Normal View History

2019-09-10 04:30:43 +02:00
<?php
/**
* 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
*/
namespace App\Models;
use App\DataMapper\ClientSettings;
use App\DataMapper\CompanySettings;
2019-09-11 07:32:47 +02:00
use App\Models\Client;
2019-09-10 04:30:43 +02:00
use App\Models\Company;
use App\Models\User;
use App\Utils\Traits\MakesHash;
use Hashids\Hashids;
use Illuminate\Database\Eloquent\SoftDeletes;
2019-09-11 07:32:47 +02:00
use Illuminate\Database\Eloquent\Model;
2019-09-10 04:30:43 +02:00
2019-09-11 07:32:47 +02:00
class GroupSetting extends Model
2019-09-10 04:30:43 +02:00
{
2019-09-11 07:32:47 +02:00
public $timestamps = false;
2019-09-10 04:30:43 +02:00
protected $casts = [
'settings' => 'object'
];
public function company()
{
return $this->belongsTo(Company::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
2019-09-11 07:32:47 +02:00
public function clients()
{
return $this->hasMany(Client::class, 'id', 'group_settings_id');
}
2019-09-10 04:30:43 +02:00
}