first commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?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(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->string('username')->comment('昵称');
|
||||
|
||||
$table->string('password')->comment('密码');
|
||||
|
||||
$table->string('email')->comment('邮箱');
|
||||
|
||||
$table->string('avatar')->comment('头像');
|
||||
|
||||
$table->string('remember_token', 1000)->comment('token');
|
||||
|
||||
$table->integer('creator_id');
|
||||
|
||||
$table->status();
|
||||
|
||||
$table->string('login_ip')->comment('登录IP');
|
||||
|
||||
$table->integer('login_at')->comment('登录时间');
|
||||
|
||||
$table->createdAt();
|
||||
|
||||
$table->updatedAt();
|
||||
|
||||
$table->deletedAt();
|
||||
|
||||
$table->comment('用户表');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
@@ -0,0 +1,40 @@
|
||||
<?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(): void
|
||||
{
|
||||
Schema::create('log_login', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->string('account')->comment('登录账户');
|
||||
|
||||
$table->string('login_ip')->comment('登录的IP');
|
||||
|
||||
$table->string('browser')->comment('浏览器');
|
||||
|
||||
$table->string('platform')->comment('平台');
|
||||
|
||||
$table->integer('login_at')->comment('平台');
|
||||
|
||||
$table->status();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user