<?php

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

class CreatePaymentAlipaysTable extends Migration
{

    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('payment_alipays', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('app_id');
            $table->string('notify_url')->nullable();
            $table->string('return_url')->nullable();
            $table->text('ali_public_key')->nullable();
            $table->text('private_key')->nullable();
            $table->string('app_cert_path')->nullable()->comment('应用公钥证书');
            $table->string('alipay_cert_path')->nullable()->comment('支付宝公钥证书');
            $table->string('alipay_root_cert_path')->nullable()->comment('支付宝根证书文件');
            $table->json('log');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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

}
