mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 00:10:00 +00:00
feat: 前端分離+功能api化
1. 新增資產管理CRUD、googleOAuth登入 2. 更改原記帳controller
This commit is contained in:
52
database/seeders/InvestmentHoldingSeeder.php
Normal file
52
database/seeders/InvestmentHoldingSeeder.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class InvestmentHoldingSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
DB::table('investment_holdings')->insert([
|
||||
[
|
||||
'id' => 1,
|
||||
'account_id' => 2,
|
||||
'type' => 'stock',
|
||||
'symbol' => '0050',
|
||||
'name' => '元大台灣50',
|
||||
'shares' => 304.00,
|
||||
'avg_cost' => 76.27,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now()
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'account_id' => 13,
|
||||
'type' => 'fund',
|
||||
'symbol' => '10350113',
|
||||
'name' => '國泰台灣高股息台幣月配',
|
||||
'shares' => 229.70,
|
||||
'avg_cost' => 43.53,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now()
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'account_id' => 18,
|
||||
'type' => 'fund',
|
||||
'symbol' => 'A36004',
|
||||
'name' => '安聯台灣科技基金',
|
||||
'shares' => 51.11,
|
||||
'avg_cost' => 782.69,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now()
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user