<?php
declare(strict_types=1);

use BaserCore\Database\Migration\BcSeed;

/**
 * Contents seed.
 */
class ContentsSeed extends BcSeed
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeds is available here:
     * https://book.cakephp.org/phinx/0/en/seeding.html
     *
     * @return void
     */
    public function run(): void
    {
        $data = [
            [
                'id' => 1,
                'name' => '',
                'plugin' => 'BaserCore',
                'type' => 'ContentFolder',
                'entity_id' => 1,
                'url' => '/',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => NULL,
                'lft' => 1,
                'rght' => 20,
                'level' => 0,
                'title' => 'baserCMSサンプル',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => 'default',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => true,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 4,
                'name' => 'index',
                'plugin' => 'BaserCore',
                'type' => 'Page',
                'entity_id' => 1,
                'url' => '/index',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 1,
                'lft' => 2,
                'rght' => 3,
                'level' => 1,
                'title' => 'トップページ',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 5,
                'name' => 'about',
                'plugin' => 'BaserCore',
                'type' => 'Page',
                'entity_id' => 2,
                'url' => '/about',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 1,
                'lft' => 6,
                'rght' => 7,
                'level' => 1,
                'title' => '会社案内',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 6,
                'name' => 'service',
                'plugin' => 'BaserCore',
                'type' => 'ContentFolder',
                'entity_id' => 4,
                'url' => '/service/',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 1,
                'lft' => 8,
                'rght' => 15,
                'level' => 1,
                'title' => 'サービス',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 7,
                'name' => 'sample',
                'plugin' => 'BaserCore',
                'type' => 'Page',
                'entity_id' => 5,
                'url' => '/sample',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 1,
                'lft' => 18,
                'rght' => 19,
                'level' => 1,
                'title' => 'サンプル',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 9,
                'name' => 'contact',
                'plugin' => 'BcMail',
                'type' => 'MailContent',
                'entity_id' => 1,
                'url' => '/contact/',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 1,
                'lft' => 16,
                'rght' => 17,
                'level' => 1,
                'title' => 'お問い合わせ',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 10,
                'name' => 'news',
                'plugin' => 'BcBlog',
                'type' => 'BlogContent',
                'entity_id' => 1,
                'url' => '/news/',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 1,
                'lft' => 4,
                'rght' => 5,
                'level' => 1,
                'title' => 'NEWS',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 11,
                'name' => 'service1',
                'plugin' => 'BaserCore',
                'type' => 'Page',
                'entity_id' => 3,
                'url' => '/service/service1',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 6,
                'lft' => 9,
                'rght' => 10,
                'level' => 2,
                'title' => 'サービス１',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 12,
                'name' => 'service2',
                'plugin' => 'BaserCore',
                'type' => 'Page',
                'entity_id' => 6,
                'url' => '/service/service2',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 6,
                'lft' => 11,
                'rght' => 12,
                'level' => 2,
                'title' => 'サービス２',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
            [
                'id' => 13,
                'name' => 'service3',
                'plugin' => 'BaserCore',
                'type' => 'Page',
                'entity_id' => 7,
                'url' => '/service/service3',
                'site_id' => 1,
                'alias_id' => NULL,
                'main_site_content_id' => NULL,
                'parent_id' => 6,
                'lft' => 13,
                'rght' => 14,
                'level' => 2,
                'title' => 'サービス３',
                'description' => '',
                'eyecatch' => '',
                'author_id' => 1,
                'layout_template' => '',
                'status' => true,
                'publish_begin' => NULL,
                'publish_end' => NULL,
                'self_status' => true,
                'self_publish_begin' => NULL,
                'self_publish_end' => NULL,
                'exclude_search' => false,
                'created_date' => NULL,
                'modified_date' => NULL,
                'site_root' => false,
                'deleted_date' => NULL,
                'exclude_menu' => false,
                'blank_link' => false,
                'created' => NULL,
                'modified' => NULL,
            ],
        ];

        $table = $this->table('contents');
        $table->insert($data)->save();
    }
}
