<?php

use think\migration\Seeder;

class ProductCompatTypesInit 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 = [
            ['id' => 1, 'language_id' => 1, 'name' => '私有云存储 NAS', 'sort' => 1, 'disabled' => 0],
            ['id' => 2, 'language_id' => 1, 'name' => '直连储存 DAS', 'sort' => 2, 'disabled' => 0]
        ];

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

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

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