<?php

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

class CreateMemberConfigTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member_config', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->tinyInteger('point_trade_deduct_enable')->comment('是否开启积分抵扣');
            $table->integer('point_trade_deduct_unit_price')->comment('积分抵扣(单位：分)');
            $table->integer('point_trade_deduct_max_price')->nullable()->comment('积分抵扣最大值');
            $table->bigInteger('point_trade_give_point')->nullable()->comment('1 元赠送多少分');
            $table->string('creator')->nullable()->comment('创建者');
            $table->string('updater')->nullable()->comment('更新者');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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