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

@@ -7,18 +7,18 @@ use Illuminate\Database\Eloquent\Model;
class Expense extends Model
{
protected $fillable = [
'user_id',
'category_id',
'subcategory_id',
'type',
'amount',
'note',
'date',
'invoice_number',
'seller_name',
'item_name',
'external_id',
];
'user_id',
'amount',
'category_id',
'item_name',
'date',
'note',
'seller_name',
'account_id',
'is_amortized',
'period_start',
'period_end',
];
protected $casts = [
'date' => 'date:Y-m-d',
@@ -39,4 +39,9 @@ class Expense extends Model
{
return $this->belongsTo(Category::class, 'subcategory_id');
}
public function account()
{
return $this->belongsTo(Account::class);
}
}