<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_order_shares', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->unsigned()->comment("收益人id");
            $table->integer('order_id')->unsigned()->comment("订单id");
            $table->string('trade_no',50)->nullable()->comment("订单号");
            $table->decimal("amount", 9)->comment("收益金额");
            $table->enum('status', ['APPLY','AUDIT','AGREE',"CONFUSE"])->nullable()->comment("状态");
            $table->string("reason")->nullable()->comment("理由");
            $table->timestamps();
        });
    }

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