generated from liutk/owl-admin-base
28 lines
512 B
PHP
28 lines
512 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\HasDateTimeFormatter;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\MorphOne;
|
|
|
|
class PlanLedger extends Model
|
|
{
|
|
use HasFactory, HasDateTimeFormatter;
|
|
|
|
protected $casts = [
|
|
'date' => 'date',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'date',
|
|
];
|
|
|
|
public function plan(): MorphOne
|
|
{
|
|
return $this->morphOne(Plan::class, 'planable');
|
|
}
|
|
}
|
|
|