<?php

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

class CreateOwnerInStorageRulesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('owner_in_storage_rules', function (Blueprint $table) {
            $table->id();
            $table->bigInteger("owner_price_operation_id")->index()->comment("外键作业计费模型");
            $table->integer("amount")->default(1)->comment("计量");
            $table->bigInteger("unit_id")->index()->comment("外键单位");
            $table->decimal("unit_price",8,4)->comment("单价");
        });
    }

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