You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

6 months ago
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('admins', function (Blueprint $table) {
$table->increments('id');
$table->string("username")->nullable()->unique()->comment("用户名");
$table->string("name")->nullable()->comment("姓名");
$table->string("mobile")->nullable()->comment("手机号码");
$table->string("password")->nullable();
$table->string("remember_token")->nullable();
$table->string("avatar")->nullable()->comment("头像地址");
$table->integer("department_id")->nullable()->comment("部门ID");
$table->string("position")->nullable()->comment("职位");
$table->integer("sortnumber")->default(0)->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admins');
}
};