<?php

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

class CreateFurnitureNewgoodsBookingTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('furniture_newgoods_booking', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('用户ID');
            $table->integer('newgoods_id')->comment('新品ID');
            $table->string('phone',20)->comment('联系电话');

            $table->string('receiver_name',255)->comment('收货人姓名');
            $table->string('receiver_address',255)->comment('收货人地址');
            $table->string('remark',255)->nullable()->comment('收货人地址');
            $table->integer('store_id')->comment('店铺ID');

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

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