feat(cloud): add inactive tracking to users and teams

This commit is contained in:
peaklabs-dev
2026-04-29 14:41:45 +02:00
parent 6caf849854
commit b4668e2e13
3 changed files with 25 additions and 0 deletions
+2
View File
@@ -46,10 +46,12 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
'personal_team',
'show_boarding',
'custom_server_limit',
'is_inactive',
];
protected $casts = [
'personal_team' => 'boolean',
'is_inactive' => 'boolean',
];
protected static function booted()
+2
View File
@@ -52,6 +52,7 @@ class User extends Authenticatable implements SendsEmail
'pending_email',
'email_change_code',
'email_change_code_expires_at',
'is_inactive',
];
protected $hidden = [
@@ -66,6 +67,7 @@ class User extends Authenticatable implements SendsEmail
'force_password_reset' => 'boolean',
'show_boarding' => 'boolean',
'email_change_code_expires_at' => 'datetime',
'is_inactive' => 'boolean',
];
/**
@@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('teams', function (Blueprint $table) {
$table->boolean('is_inactive')->default(false);
$table->index('is_inactive');
});
Schema::table('users', function (Blueprint $table) {
$table->boolean('is_inactive')->default(false);
$table->index('is_inactive');
});
}
};