<?php

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

class CreateWMSReflectReceivesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('w_m_s_reflect_receives', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('id_rejected_bill')->index()->comment('连入RejectedBill的外键');
            $table->boolean('is_uploaded')->default(false);
            $table->string('ASNNO')->index()->comment('WMS订单号');
            $table->string('WAREHOUSEID')->index()->comment('仓库编号');
            $table->string('CUSTOMERID')->index()->comment('货主编号');
            $table->string('ASNTYPE')->nullable()->comment('订单类型');
            $table->string('ASNREFERENCE1')->index()->nullable()->comment('客户订单号');
            $table->string('ASNREFERENCE2')->nullable()->comment('出库单号');
            $table->string('ASNREFERENCE3')->index()->nullable()->comment('退货快递单号');
            $table->string('ASNSTATUS')->nullable()->comment('');
            $table->string('NOTES')->nullable()->comment('备注');
            $table->string('USERDEFINE1')->nullable();
            $table->string('USERDEFINE2')->nullable();
            $table->string('USERDEFINE3')->nullable();
            $table->timestamps();
        });
    }

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