<?php
namespace App\Entity;
use App\Entity\User\User;
use App\Repository\SMSRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: SMSRepository::class)]
class SMS
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'sms', cascade: ['persist', 'remove'])]
private $user;
#[ORM\Column(type: 'string', length: 255)]
private $code;
#[ORM\Column(type: 'boolean', nullable: true)]
private $activity;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function getActivity(): ?bool
{
return $this->activity;
}
public function setActivity(?bool $activity): self
{
$this->activity = $activity;
return $this;
}
}