<?php

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

class CreatePaymentSettingsTable extends Migration
{

    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('payment_settings', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('配置名称');
            $table->tinyInteger('trade_id_counter_length')->default(6);
            $table->boolean('in_use')->default(0)->comment('是否是使用中的配置');
            $table->unsignedBigInteger('alipay_id')->nullable();
            $table->unsignedBigInteger('wechat_id')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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

}
