<?php

use Illuminate\Database\Seeder;

class MstPropertyTypesSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // データのクリア
        DB::table('mst_property_types')->truncate();

        // データの挿入
        $types = [
            ['code' => 1, 'parent_code' => 1, 'name' => '土地'],
            ['code' => 2, 'parent_code' => 1, 'name' => '土地（借地権）'],
            ['code' => 3, 'parent_code' => 1, 'name' => '土地（底地権）'],
            ['code' => 4, 'parent_code' => 2, 'name' => '戸建'],
            ['code' => 5, 'parent_code' => 2, 'name' => 'テラスハウス'],
            ['code' => 6, 'parent_code' => 3, 'name' => 'マンション'],
            ['code' => 7, 'parent_code' => 3, 'name' => 'テラスハウス'],
        ];
        DB::table('mst_property_types')->insert($types);
    }
}
