<?php

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

class CreateTableSingleProject extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('single_project', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('cate_id')->comment('单项所属类目');
            $table->string('name')->comment('单项名称');
            $table->decimal('oldPrice')->comment('原价');
            $table->decimal('realPrice')->comment('现价');
            $table->unsignedInteger('sort')->comment('排序');
            $table->softDeletes();
            $table->timestamps();
        });
    }

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