<?php

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

class AddEndTimeToCardInfo extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('card_info', function (Blueprint $table) {
            $table->date('end_time')->after('remark')->nullable()->comment('有效期');
            $table->string('product_id',255)->after('end_time')->nullable()->comment('可用产品');
            $table->double('min_price')->after('price')->nullable()->comment('最低可用价格');
            $table->string('qrcode',255)->after('min_price')->nullable()->comment('二维码');
        });
    }

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