<?php

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

class CreateSettingInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('setting_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('app_id')->nullable()->comment('小程序appid');
            $table->string('app_secret')->nullable()->comment('小程序secret');

            $table->string('mch_id')->nullable()->comment('支付商户号');
            $table->string('api_key')->nullable()->comment('支付密钥');
            $table->string('cert_path')->nullable()->comment('支付cart路径');
            $table->string('key_path')->nullable()->comment('支付key路径');

            $table->string('free_refund_time')->nullable()->comment('免手续费退款时间,小时');
            $table->string('refund_poundage_in')->nullable()->comment('未到期退款手续费，百分比');
            $table->string('refund_poundage_out')->nullable()->comment('到期退款手续费，百分比');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('setting_info');
    }
}
