37 lines
927 B
PHP
37 lines
927 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateAgentsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('agents', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name')->comment('等级名称');
|
|
$table->string('slug')->comment('标识');
|
|
$table->unsignedBigInteger('growth_value')->default(0)->comment('等级成长值');
|
|
$table->unsignedInteger('sort')->comment('等级');
|
|
$table->integer('ratio')->comment('返佣比例, 10 => 10%');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('agents');
|
|
}
|
|
}
|