feat: 前端分離+功能api化

1. 新增資產管理CRUD、googleOAuth登入
2. 更改原記帳controller
This commit is contained in:
2026-06-25 14:19:07 +08:00
parent 7bb931c97b
commit 85972f950c
70 changed files with 4754 additions and 1520 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class InvestmentTransaction extends Model
{
protected $fillable = [
'holding_id',
'action',
'shares',
'price',
'fee',
'tax',
'traded_at',
'note',
'amount', // 實際投入金額(基金用)
'nav', // 淨值(基金用)
];
protected $casts = [
'traded_at' => 'date',
];
public function holding()
{
return $this->belongsTo(InvestmentHolding::class, 'holding_id');
}
}