Роли, переделывание отчета, изменение на главной странице

This commit is contained in:
brusnitsyn
2026-01-11 23:37:18 +09:00
parent eb019504d7
commit d4f077cdaf
59 changed files with 2099 additions and 366 deletions

View File

@@ -11,6 +11,13 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('roles', function (Blueprint $table) {
$table->id('role_id');
$table->string('name');
$table->string('slug');
$table->boolean('is_active')->default(true);
});
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
@@ -23,6 +30,14 @@ return new class extends Migration
$table->timestamps();
});
Schema::create('user_roles', function (Blueprint $table) {
$table->id('user_role_id');
$table->foreignIdFor(\App\Models\User::class, 'rf_user_id');
$table->foreignIdFor(\App\Models\Role::class, 'rf_role_id');
$table->boolean('is_active')->default(true);
$table->boolean('is_default')->default(false);
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('login')->primary();
$table->string('token');