dbmsv4/app/DTOs/Auth/LocalDTO.php
2025-11-18 16:54:55 +09:00

28 lines
473 B
PHP

<?php
namespace App\DTOs\Auth;
class LocalDTO extends AuthDTO
{
public ?string $id = null;
public ?string $passwd = null;
public function __construct(array $datas = [])
{
parent::__construct();
foreach ($datas as $key => $value) {
if (property_exists($this, $key)) {
$this->{$key} = $value;
}
}
}
public function toArray(): array
{
return [
'id' => $this->id,
'passwd' => $this->passwd,
];
}
}