<?php

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

class CreateOrderInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('out_trade_no',255)->comment('订单编号');
            $table->string('username',64)->comment('用户姓名');
            $table->tinyInteger('sex')->comment("性别：0：男；1：女");
            $table->string('phone',11)->comment('电话');
            $table->string('email',100)->comment('邮箱');
            $table->string('store_id')->comment('预约店铺');
            $table->string('schedule_time')->comment('预约时间');
            $table->tinyInteger('status')->default(0)->comment('订单状态:0:未付款;1:已付款，未完成；2:已完成；3:已取消');
            $table->integer('user_id')->comment('用户id');
            $table->string('comment',255)->nullable()->comment('备注');

            $table->softDeletes();
            $table->timestamps();
        });
    }

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