6
0
Fork 0
jiqu-library-server/database/migrations/2022_01_12_151731_create_de...

36 lines
916 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDealersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('dealers', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id')->unique()->comment('用户ID');
$table->tinyInteger('lvl')->default(0)->comment('经销商等级');
$table->boolean('is_sale')->default(false)->comment('是否可销售');
$table->boolean('is_manager')->default(false)->comment('是否是管理者');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('dealers');
}
}