Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
.git
/
objects
:
Account.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php declare(strict_types=1); namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Support\Carbon; /** * @property int $id * @property int $model_id * @property string $name * @property int $organization_id * @property float $deposit * @property Carbon|null $created_at * @property Carbon|null $updated_at * * @property-read Organization $organization */ class Account extends Model { protected $table = 'accounts'; protected $fillable = [ 'model_id', 'external_id', 'name', 'organization_id', 'deposit', 'number', 'archived', 'added', 'cor_number', 'balance_of_the_date', 'bank_name', 'bank_bic', 'bank_city', 'organization_name', 'is_cash', 'current_balance' ]; /** * Связь с моделью Organization. */ public function organization(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } public function payments() { return $this->HasMany(Payment::class); } public function bank() { return $this->belongsTo(Bank::class); } }