33 lines
598 B
PHP
33 lines
598 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\BadDebts;
|
||
|
|
|
||
|
|
use App\Models\Members\User;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class BadDebtMemo extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'bad_debt_id',
|
||
|
|
'content',
|
||
|
|
'created_by',
|
||
|
|
];
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 악성채권 관계
|
||
|
|
*/
|
||
|
|
public function badDebt(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(BadDebt::class);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 작성자 관계
|
||
|
|
*/
|
||
|
|
public function creator(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(User::class, 'created_by');
|
||
|
|
}
|
||
|
|
}
|