mirror of
https://github.com/coollabsio/coolify.git
synced 2026-06-14 03:19:51 +00:00
feat(cloud): add inactive tracking to users and teams
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user