From a44c9cd05a1e95fc99de033bd880597d626431df Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Thu, 12 Jun 2025 15:31:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=A7=E5=93=81=E8=B4=AD=E4=B9=B0?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0seeder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seeds/ProductPurchasePlatformInit.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/seeds/ProductPurchasePlatformInit.php diff --git a/database/seeds/ProductPurchasePlatformInit.php b/database/seeds/ProductPurchasePlatformInit.php new file mode 100644 index 00000000..e200a8c4 --- /dev/null +++ b/database/seeds/ProductPurchasePlatformInit.php @@ -0,0 +1,32 @@ + 1, "language_id" => 1, "platform" => "京东购买", "desc" => null, "sort" => 0, "created_at" => "2025-02-18 14:55:11"], + ["id" => 2, "language_id" => 1, "platform" => "天猫购买", "desc" => null, "sort" => 0, "created_at" => "2025-02-18 14:55:31"], + ["id" => 3, "language_id" => 2, "platform" => "Shop on ORlCO Store", "desc" => null, "sort" => 0, "created_at" => "2025-04-25 16:37:39"], + ["id" => 4, "language_id" => 2, "platform" => "Shop on Amazon", "desc" => null, "sort" => 0, "created_at" => "2025-04-25 16:37:47"], + ]; + + $table = $this->table('product_purchase_platform'); + + // empty the table + $table->truncate(); + + // insert data + $table->insert($data)->saveData(); + } +} \ No newline at end of file