diff --git a/database/seeds/SysCountryInit.php b/database/seeds/SysCountryInit.php new file mode 100644 index 00000000..e3849645 --- /dev/null +++ b/database/seeds/SysCountryInit.php @@ -0,0 +1,30 @@ + 1, "name" => "中国", "en_name" => "China", "code" => "ZH", "icon" => null, "status" => 1, "sort" => 1, "created_at" => "2025-01-04 14:04:27", "updated_at" => "2025-03-14 11:52:17"], + ["id" => 2, "name" => "美国", "en_name" => "USA", "code" => "US", "icon" => null, "status" => 1, "sort" => 2, "created_at" => "2025-03-25 13:45:51", "updated_at" => "2025-04-07 11:54:43"] + ]; + + $table = $this->table('sys_country'); + + // empty the table + $table->truncate(); + + // insert data + $table->insert($data)->saveData(); + } +} \ No newline at end of file