Files
ntonpower/database/seeds/SiteCurrencyInit.php
2026-10-14 14:00:29 +08:00

86 lines
2.3 KiB
PHP

<?php
use think\migration\Seeder;
class SiteCurrencyInit extends Seeder
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeders is available here:
* http://docs.phinx.org/en/latest/seeding.html
*/
public function run()
{
$data = [
[
"id" => null,
"platform_id" => 1,
"currency_id" => 1,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 2,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 3,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 4,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 5,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 5,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 6,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 7,
"create_time" => time(),
"update_time" => time()
],
[
"id" => null,
"platform_id" => 1,
"currency_id" => 8,
"create_time" => time(),
"update_time" => time()
]
];
$table = $this->table('platform_coin');
$table->insert($data)->saveData();
}
}