<?php

namespace App\ValueObjects;

use App\Models\User;

class MessageRecipient {
    private ?User $user;
    /** @var EmailAddress[] */
    private array $emailAddresses;
    private string $name;

    public function __construct() {
        $this->user = null;
        $this->emailAddresses = [];
        $this->name = "";
    }

    public function getUser(): ?User
    {
        return $this->user;
    }

    public function setUser(?User $user): void
    {
        $this->user = $user;
    }

    public function getEmailAddresses(): array
    {
        return $this->emailAddresses;
    }

    public function addEmailAddress(EmailAddress $emailAddresses): void
    {
        $this->emailAddresses[] = $emailAddresses;
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function setName(string $name): void
    {
        $this->name = $name;
    }


}
