<?php

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

/**
 * Migration auto-generated by Sequel Pro Laravel Export
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
 */
class CreateS1OrderInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s1_order_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('appid')->comment('app_id')->default(0);
            $table->integer('wx_user_id')->comment('谁的订单');
            $table->integer('wx_address_id')->comment('订单地址');
            $table->string('trade_no', 255)->comment('微信订单编号');
            $table->string('amount', 255)->comment('订单总价');
            $table->integer('status')->default(1)->comment('状态');
            $table->timestamp('order_time')->default(\DB::raw('CURRENT_TIMESTAMP'))->comment('下单时间');
            $table->timestamp('pay_time')->default('0000-00-00 00:00:00')->comment('支付时间');
            $table->timestamp('send_time')->default('0000-00-00 00:00:00')->comment('发货时间');
            $table->timestamp('get_time')->default('0000-00-00 00:00:00')->comment('收货时间');
            $table->timestamp('apply_time')->default('0000-00-00 00:00:00')->comment('申请退款时间');
            $table->timestamp('reply_time')->default('0000-00-00 00:00:00')->comment('退款时间');
            $table->string('remark', 255)->nullable()->comment('备注');
            $table->nullableTimestamps();
            $table->softDeletes();

            

            

        });
    }

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