<?php

use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UpdateDataSiteConfig extends Migration
{

    public function up()
    {

        $profileRateMapping = <<<EOT
{"dashboard_section":{"general":{"title":"enw-general-title","icon":"/img/hede.jpeg","description":"enw-general-dashboard-general-desc","menus":[{"id":null,"name":"Information","language_key":"enw-general-tab-information","title_language_key":null,"type":null,"icon":null,"alias":"Property.Information.Update","url":"/app/content/information","is_disable":false},{"id":null,"name":"Communication","language_key":"enw-general-tab-communication","title_language_key":null,"type":null,"icon":null,"alias":"Property.Contact.Update","url":"/app/content/communication","is_disable":false},{"id":null,"name":"Employees","language_key":"enw-general-tab-employees","title_language_key":null,"type":null,"icon":null,"alias":"Property.Executive.List","url":"/app/content/employees","is_disable":false},{"id":null,"name":"Location","language_key":"enw-general-tab-location","title_language_key":null,"type":null,"icon":null,"alias":"Property.Location.Update","url":"/app/content/location","is_disable":false},{"id":null,"name":"Brand","language_key":"enw-general-tab-brand","title_language_key":null,"type":null,"icon":null,"alias":"Property.Brand.Update","url":"/app/content/brand","is_disable":false},{"id":null,"name":"Awards and Certificates","language_key":"enw-general-tab-award-and-certificates","title_language_key":null,"type":null,"icon":null,"alias":"Property.AwardCertificates.List","url":"/app/content/award-and-certificates","is_disable":false},{"id":null,"name":"Photo Gallery","language_key":"enw-photo_gallery-title","title_language_key":null,"type":null,"icon":null,"alias":"Property.Photo.Upload","url":"/app/content/photos","is_disable":false}]},"amenities":{"title":"property_fact-amenities","icon":"","description":"enw-amenities-dashboard-desc","menus":null},"facility":{"title":"property_fact-facilities","icon":"","description":"enw-facilities-dashboard-desc","menus":null},"room":{"title":"enw-room-title","icon":"","description":"enw-room-dashboard-desc","menus":[{"id":null,"name":"Rooms","language_key":"enw-room-tab-rooms","title_language_key":null,"type":null,"icon":null,"alias":"Property.RoomAndBed.Add","url":"/app/content/rooms","is_disable":false},{"id":null,"name":"Room Amenities","language_key":"enw-room-tab-room_amenities","title_language_key":null,"type":null,"icon":null,"alias":"Property.RoomFactMapping.Update","url":"/app/content/room-amenities","is_disable":false},{"id":null,"name":"Room Photos","language_key":"enw-room-tab-room_photos","title_language_key":null,"type":null,"icon":null,"alias":"Property.RoomPhotoMapping.Update","url":"/app/content/room-photos","is_disable":false}]},"places":{"title":"enw-places-title","icon":"/img/hede.jpeg","description":"enw-dashboard-places-desc","menus":[{"id":null,"name":"Places","language_key":"enw-places_list-title","title_language_key":null,"type":null,"icon":null,"alias":"Property.Places.List","url":"/app/content/places","is_disable":false},{"id":null,"name":"Place Photos","language_key":"enw-places_photos-title","title_language_key":null,"type":null,"icon":null,"alias":"Property.Places.Photos.List","url":"/app/content/places/photo","is_disable":false}]}}}
EOT;

        DB::table('site_config')->where('config_key' , 'profile_rate_mapping')->update(['config_value_json' => $profileRateMapping]);

    }


    public function down()
    {
        //
    }
}
