mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 08:20:00 +00:00
29 lines
570 B
PHP
29 lines
570 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SecurityPriceHistories extends Model
|
|
{
|
|
protected $fillable = [
|
|
'id',
|
|
'security_id',
|
|
'price_date',
|
|
'price',
|
|
'change_amount',
|
|
'change_rate',
|
|
];
|
|
|
|
protected $casts = [
|
|
'price' => 'decimal:4',
|
|
'price_date' => 'datetime',
|
|
'change_amount' => 'decimal:4',
|
|
'change_rate' => 'decimal:4',
|
|
];
|
|
|
|
public function security()
|
|
{
|
|
return $this->belongsTo(Security::class, 'security_id', 'id');
|
|
}
|
|
} |