add company and users table migrations
This commit is contained in:
@@ -16,15 +16,17 @@ return new class extends Migration
|
||||
$table->string('username', 100)->unique()->comment('用户名');
|
||||
$table->string('password')->comment('密码');
|
||||
$table->string('email', 100)->unique()->comment('邮箱');
|
||||
$table->tinyInteger('status')->default(1)->comment('状态:0=禁用,1=启用');
|
||||
$table->tinyInteger('status')->default(1)->comment('状态:-1 软删除,0=禁用,1=启用');
|
||||
$table->unsignedBigInteger('role_id')->nullable()->comment('角色ID');
|
||||
$table->text('ext')->nullable()->comment('扩展信息(JSON格式)');
|
||||
$table->string('refresh_token', 500)->nullable()->comment('刷新令牌');
|
||||
$table->timestamp('refresh_token_expires_at')->nullable()->comment('刷新令牌过期时间');
|
||||
$table->datetimes();
|
||||
$table->timestampTz('refresh_token_expires_at')->nullable()->comment('刷新令牌过期时间');
|
||||
$table->timestampsTz();
|
||||
|
||||
$table->index('username');
|
||||
$table->index('email');
|
||||
$table->index('status');
|
||||
$table->index('role_id');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ return new class extends Migration
|
||||
$table->string('label')->nullable()->default('null')->comment('公司名 中文');
|
||||
$table->boolean('enabled')->default('true')->comment('激活状态');
|
||||
$table->text('ext')->default('null')->comment('额外信息');
|
||||
$table->datetimes();
|
||||
$table->timestampsTz();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user