<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('agent_project_cate', function (Blueprint $table) {
            $table->comment('代理商项目分类');
            $table->increments('id');
            $table->unsignedBigInteger('agent_id')->comment('代理商ID');
            $table->unsignedBigInteger('cate_id')->comment('项目分类ID');
            $table->string('state')->default('enable')->comment('状态(enable:启用 disable:禁用)');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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