<?php

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

class CreateCardInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('card_info', function (Blueprint $table) {
            $table->increments('id');
            $table->string('card_no')->comment('优惠卡编号');
            $table->double('price')->comment('金额');
            $table->tinyInteger('status')->comment('0:未激活；1：已激活，未使用；2：已使用');
            $table->integer('user_id')->nullable()->comment('用户ID');
            $table->string('remark')->nullable()->comment('备注');

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

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