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
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use App\Casts\TenantEncrypted;
use App\Models\Concerns\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
class DeviceAccessUser extends Model
{
use BelongsToTenant, SoftDeletes;
protected $fillable = ['tenant_id', 'display_name', 'username', 'password', 'is_enabled', 'notes', 'created_by', 'updated_by'];
protected $hidden = ['password'];
protected static function booted(): void
{
static::creating(fn (self $user) => $user->uuid ??= (string) Str::uuid());
}
protected function casts(): array
{
return ['password' => TenantEncrypted::class, 'is_enabled' => 'boolean'];
}
public function assignments()
{
return $this->hasMany(DeviceUserAssignment::class);
}
}