Initial commit device-management
tests / ci (push) Has been cancelled

This commit is contained in:
Wian Drs
2026-08-25 09:42:00 +07:00
commit 1e80be180e
1159 changed files with 149545 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use App\Models\Concerns\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class TenantEncryptionKey extends Model
{
use BelongsToTenant;
protected $fillable = ['tenant_id', 'version', 'wrapped_key', 'is_active', 'source', 'created_by', 'retired_at'];
protected $hidden = ['wrapped_key'];
protected static function booted(): void
{
static::creating(fn (self $key) => $key->uuid ??= (string) Str::uuid());
}
protected function casts(): array
{
return ['is_active' => 'boolean', 'retired_at' => 'immutable_datetime'];
}
}