sifangpay/database/migrations/2018_12_22_163306_create_ad...

41 lines
1.3 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admins', function (Blueprint $table) {
$table->increments('id');
$table->string('account')->comment('账号');
$table->string('mobile', 60)->comment('手机');
$table->string('realname', 10)->nullable()->comment('真实姓名');
$table->string('password')->nullable()->comment('密码');
$table->integer('last_number')->default(0)->comment('登陆次数');
$table->string('ip', 60)->default('')->comment('登陆IP');
$table->dateTime('last_time')->nullable()->comment('最后登陆时间');
$table->tinyInteger('is_checked')->default(1)->comment('状态1:启用,0:禁用');
$table->string('remember_token',120)->nullable()->comment('记录登陆');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admins');
}
}