<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateAdmin extends Migration { public function up() { goto CuG8t; RwGun: Schema::connection($GU5eI)->create('admin_role', function (Blueprint $loNjC) { $loNjC->increments('id'); $loNjC->timestamps(); $loNjC->string('name', 200)->comment('')->nullable(); }); goto qAjFf; gGK_C: Schema::connection($GU5eI)->create('admin_user_role', function (Blueprint $loNjC) { $loNjC->increments('id'); $loNjC->timestamps(); $loNjC->unsignedInteger('userId')->nullable(); $loNjC->unsignedInteger('roleId')->nullable(); $loNjC->index('userId'); $loNjC->index('roleId'); }); goto Y9lHZ; QLLTj: Schema::connection($GU5eI)->create('admin_user', function (Blueprint $loNjC) { $loNjC->increments('id'); $loNjC->timestamps(); $loNjC->string('username', 100)->comment('')->nullable(); $loNjC->char('password', 32)->comment('')->nullable(); $loNjC->char('passwordSalt', 16)->comment('')->nullable(); $loNjC->boolean('ruleChanged')->comment('')->nullable(); $loNjC->timestamp('lastLoginTime')->comment('')->nullable(); $loNjC->string('lastLoginIp', 20)->comment('')->nullable(); $loNjC->timestamp('lastChangePwdTime')->comment('')->nullable(); $loNjC->unique('username'); }); goto gGK_C; CuG8t: $GU5eI = config('modstart.admin.database.connection') ?: config('database.default'); goto RwGun; Y9lHZ: Schema::create('admin_log', function (Blueprint $loNjC) { $loNjC->increments('id'); $loNjC->timestamps(); $loNjC->integer('adminUserId')->nullable()->comment('用户ID'); $loNjC->tinyInteger('type')->nullable()->comment('类型'); $loNjC->string('summary', 400)->nullable()->comment('摘要'); }); goto lKxn_; lKxn_: Schema::create('admin_log_data', function (Blueprint $loNjC) { $loNjC->increments('id'); $loNjC->timestamps(); $loNjC->text('content')->nullable()->comment('内容'); }); goto YnCtv; qAjFf: Schema::connection($GU5eI)->create('admin_role_rule', function (Blueprint $loNjC) { $loNjC->increments('id'); $loNjC->timestamps(); $loNjC->unsignedInteger('roleId')->comment('')->nullable(); $loNjC->string('rule', 200)->comment('')->nullable(); $loNjC->index('roleId'); }); goto QLLTj; YnCtv: } public function down() { } }