mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 08:20:00 +00:00
53 lines
1.4 KiB
PHP
53 lines
1.4 KiB
PHP
<?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()
|
|
],
|
|
]);
|
|
}
|
|
}
|