<?php

use think\migration\Seeder;

class ProductAttrPropInit 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(): void
    {
        $data = [
            ["attr_id" => 1, "prop_name" =>	"红色", "prop_value" => "/static/common/images/colors/RD.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"蓝色", "prop_value" => "/static/common/images/colors/BL.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"金色", "prop_value" => "/static/common/images/colors/GD.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"白色", "prop_value" => "/static/common/images/colors/WH.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"粉色", "prop_value" => "/static/common/images/colors/PK.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"黑色", "prop_value" => "/static/common/images/colors/BK.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"灰色", "prop_value" => "/static/common/images/colors/GY.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"绿色", "prop_value" => "/static/common/images/colors/GR.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"银色", "prop_value" => "/static/common/images/colors/SV.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"黄色", "prop_value" => "/static/common/images/colors/YL.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"橙色", "prop_value" => "/static/common/images/colors/OR.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"紫色", "prop_value" => "/static/common/images/colors/PU.png", "created_at" => "2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"咖啡色", "prop_value" => "/static/common/images/colors/CF.png", "created_at" =>"2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"玫瑰金色", "prop_value" => "/static/common/images/colors/RG.png", "created_at" =>"2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"多彩色", "prop_value" => "/static/common/images/colors/CO.png", "created_at" =>"2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"透明色", "prop_value" => "/static/common/images/colors/CR.png", "created_at" =>"2025-04-24 17:48:45"],
            ["attr_id" => 1, "prop_name" =>	"木纹色", "prop_value" => "/static/common/images/colors/WD.png", "created_at" =>"2025-04-24 17:48:45"],
            ["attr_id" => 2, "prop_name" =>	"红色", "prop_value" => "/static/common/images/colors/RD.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"蓝色", "prop_value" => "/static/common/images/colors/BL.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"金色", "prop_value" => "/static/common/images/colors/GD.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"白色", "prop_value" => "/static/common/images/colors/WH.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"粉色", "prop_value" => "/static/common/images/colors/PK.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"黑色", "prop_value" => "/static/common/images/colors/BK.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"灰色", "prop_value" => "/static/common/images/colors/GY.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"绿色", "prop_value" => "/static/common/images/colors/GR.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"银色", "prop_value" => "/static/common/images/colors/SV.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"黄色", "prop_value" => "/static/common/images/colors/YL.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"橙色", "prop_value" => "/static/common/images/colors/OR.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"紫色", "prop_value" => "/static/common/images/colors/PU.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"咖啡色", "prop_value" => "/static/common/images/colors/CF.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"玫瑰金色", "prop_value" => "/static/common/images/colors/RG.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"多彩色", "prop_value" => "/static/common/images/colors/CO.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"透明色", "prop_value" => "/static/common/images/colors/CR.png", "created_at" => "2025-04-24 17:49:24"],
            ["attr_id" => 2, "prop_name" =>	"木纹色", "prop_value" => "/static/common/images/colors/WD.png", "created_at" => "2025-04-24 17:49:24"]
        ];

        $table = $this->table('product_attr_prop');

        // empty the table
        $table->truncate();

        // insert data
        $table->insert($data)->saveData();
    }
}