love_php/database/migrations/2018_01_19_042126_create_rights.php
2026-04-02 09:20:51 +08:00

37 lines
879 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRights extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rights', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->string('type')->comment('权限类型open: 公开, friend: 好友可见, right:特定条件, 参考right_id; user:仅用户可见可见');
$table->text('config')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rights');
}
}