php-tenant/Models/UserTwoFactorAuth.php
Snider d0ad2737cb refactor: rename namespace from Core\Mod\Tenant to Core\Tenant
Simplifies the namespace hierarchy by removing the intermediate Mod
segment. Updates all 118 files including models, services, controllers,
middleware, tests, and composer.json autoload configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 16:30:46 +00:00

38 lines
746 B
PHP

<?php
declare(strict_types=1);
namespace Core\Tenant\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* User two-factor authentication record.
*
* Stores TOTP secrets and recovery codes for 2FA.
*/
class UserTwoFactorAuth extends Model
{
protected $table = 'user_two_factor_auth';
protected $fillable = [
'user_id',
'secret_key',
'recovery_codes',
'confirmed_at',
];
protected $casts = [
'recovery_codes' => 'collection',
'confirmed_at' => 'datetime',
];
/**
* Get the user this 2FA belongs to.
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}