birzha-legalizasia/app/Models/Company.php

79 lines
2.1 KiB
PHP
Raw Normal View History

<?php
namespace App\Models;
use Backpack\CRUD\app\Models\Traits\CrudTrait;
use Illuminate\Database\Eloquent\Model;
class Company extends Model
{
use CrudTrait;
/*
|--------------------------------------------------------------------------
| GLOBAL VARIABLES
|--------------------------------------------------------------------------
*/
protected $table = 'companies';
// protected $primaryKey = 'id';
// public $timestamps = false;
protected $guarded = ['id'];
protected $fillable = [
'name',
'short_name',
'registration_number',
'registration_date',
'state_registration_agency',
'registration_place',
'registration_address',
'fond_capital',
'management_types',
'signers',
'share_holders',
'organizational_form',
'is_agent'
];
// protected $hidden = [];
// protected $dates = [];
protected $casts = [
'management_types' => 'array',
'signers' => 'array',
'share_holders' => 'array',
];
/*
|--------------------------------------------------------------------------
| FUNCTIONS
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/
2022-07-08 09:40:16 +00:00
public function account()
{
return $this->morphOne(Account::class, 'profile');
}
/*
|--------------------------------------------------------------------------
| SCOPES
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| ACCESSORS
|--------------------------------------------------------------------------
*/
/*
|--------------------------------------------------------------------------
| MUTATORS
|--------------------------------------------------------------------------
*/
}