<?php

use think\migration\Seeder;

class AgentEnterpriseSizeTypeInit 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" => "10或更少", "value" => "10 Or Less", "desc" => null, "sort" => 1, "created_at" => "2025-03-13 17:41:06"],
            ["id" => 2, "language_id" => 1, "name" => "10-50", "value" => "1-50", "desc" => null, "sort" => 2, "created_at" => "2025-03-13 17:41:41"],
            ["id" => 3, "language_id" => 1, "name" => "50-199", "value" => "50-199", "desc" => null, "sort" => 3, "created_at" => "2025-03-13 17:41:57"],
            ["id" => 4, "language_id" => 1, "name" => "200或更多", "value" => "200 Or More", "desc" => null, "sort" => 4, "created_at" => "2025-03-13 17:42:20"],
            ["id" => 5, "language_id" => 2, "name" => "10 Or Less", "value" => "10 Or Less", "desc" => null, "sort" => 1, "created_at" => "2025-03-13 17:41:06"],
            ["id" => 6, "language_id" => 2, "name" => "1-50", "value" => "1-50", "desc" => null, "sort" => 2, "created_at" => "2025-03-13 17:41:41"],
            ["id" => 7, "language_id" => 2, "name" => "50-199", "value" => "50-199", "desc" => null, "sort" => 3, "created_at" => "2025-03-13 17:41:57"],
            ["id" => 8, "language_id" => 2, "name" => "200 Or More", "value" => "200 Or More", "desc" => null, "sort" => 4, "created_at" => "2025-03-13 17:42:20"]
        ];

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

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

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