<?php

namespace App\Entity;

use App\Repository\ParticipationRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
use Misd\PhoneNumberBundle\Validator\Constraints as MisdAssert;
use Symfony\Component\Validator\Constraints as Assert;

#[ORM\Entity(repositoryClass: ParticipationRepository::class)]
class Participation
{
    #[ORM\Id]
    #[ORM\Column(type: UuidType::NAME, nullable: true)]
    #[ORM\GeneratedValue(strategy: 'CUSTOM')]
    #[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
    private ?Uuid $id = null;

    #[ORM\ManyToOne(inversedBy: 'participations')]
    #[ORM\JoinColumn(nullable: false)]
    private ?Party $party = null;

    #[ORM\Column(length: 255)]
    private ?string $participantName = null;

    #[Assert\Email]
    #[ORM\Column(length: 255)]
    private ?string $participantEmail = null;

    #[MisdAssert\PhoneNumber()]
    #[ORM\Column(length: 255, nullable: true)]
    private ?string $participantPhone = null;

    #[ORM\Column(nullable: true)]
    private ?bool $consentMail = null;

    #[ORM\Column(nullable: true)]
    private ?bool $consentImage = null;

    #[ORM\Column(nullable: true)]
    private ?bool $checkin = null;

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

    public function setId(Uuid $id): static
    {
        $this->id = $id;

        return $this;
    }

    public function getParty(): ?Party
    {
        return $this->party;
    }

    public function setParty(?Party $party): static
    {
        $this->party = $party;

        return $this;
    }

    public function getParticipantName(): ?string
    {
        return $this->participantName;
    }

    public function setParticipantName(string $participantName): static
    {
        $this->participantName = $participantName;

        return $this;
    }

    public function getParticipantEmail(): ?string
    {
        return $this->participantEmail;
    }

    public function setParticipantEmail(string $participantEmail): static
    {
        $this->participantEmail = $participantEmail;

        return $this;
    }

    public function getParticipantPhone(): ?string
    {
        return $this->participantPhone;
    }

    public function setParticipantPhone(?string $participantPhone): static
    {
        $this->participantPhone = $participantPhone;

        return $this;
    }

    public function isConsentMail(): ?bool
    {
        return $this->consentMail;
    }

    public function setConsentMail(?bool $consentMail): static
    {
        $this->consentMail = $consentMail;

        return $this;
    }

    public function isConsentImage(): ?bool
    {
        return $this->consentImage;
    }

    public function setConsentImage(?bool $consentImage): static
    {
        $this->consentImage = $consentImage;

        return $this;
    }

    public function isCheckin(): ?bool
    {
        $checkin = $this->checkin;

        return $checkin;
    }

    public function setCheckin(bool $checkin): static
    {
        $this->checkin = $checkin;

        return $this;
    }
}
