<?php

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

class CreateOwnerPriceOperationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('owner_price_operations', function (Blueprint $table) {
            $table->id();
            $table->enum("operation_type",["入库","出库"])->default("入库")->comment("操作类型");
            $table->string("name")->nullable()->comment("名称");
            $table->enum("strategy",["默认","特征"])->default("默认")->comment("策略");
            $table->integer("priority")->default(0)->index()->comment("匹配优先级(越大越优先)");
            $table->string("feature")->nullable()->comment("特征");
            $table->string("remark")->nullable()->comment("备注");
            $table->timestamps();
        });
    }

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