Loan paid off letter order
This commit is contained in:
68
app/Models/Order/Loan/LoanPaidOffLetterOrder.php
Normal file
68
app/Models/Order/Loan/LoanPaidOffLetterOrder.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Order\Loan;
|
||||
|
||||
use App\Models\Branch\Branch;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Laravel\Nova\Actions\Actionable;
|
||||
|
||||
class LoanPaidOffLetterOrder extends Model
|
||||
{
|
||||
use Actionable;
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'unique_id',
|
||||
'region',
|
||||
'branch_id',
|
||||
'customer_name',
|
||||
'customer_surname',
|
||||
'customer_patronic_name',
|
||||
'born_at',
|
||||
'phone',
|
||||
'passport_serie',
|
||||
'passport_id',
|
||||
'loan_contract_number',
|
||||
'loan_contract_date',
|
||||
'loan_amount',
|
||||
'loan_reason',
|
||||
'status',
|
||||
'notes',
|
||||
'user_id',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'born_at' => 'date',
|
||||
];
|
||||
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch
|
||||
*/
|
||||
public function branch(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Branch::class, 'branch_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user