<?php

namespace Src\Modules\Auth\Dto\Admin;

trait AdminTrait {

    protected ?string $id = null;

    protected ?string $email = null;

    protected ?string $passwordHash = null;

    public function getId(): string
    {
        return $this->id;
    }

    public function load(array $data): void
    {
        $this->id = $data['id'] ?? null;
        $this->email = $data['email'] ?? null;
        $this->passwordHash = $data['password_hash'] ?? null;
    }

    public function getAttributes(): array
    {
        return [
            'id' => $this->id,
            'email' => $this->email,
            'password_hash' => $this->passwordHash,
        ];
    }

}