src/Entity/Membership.php line 9
<?php
namespace App\Entity;
use App\Repository\MembershipRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MembershipRepository::class)]
class Membership
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column]
private ?\DateTimeImmutable $startedAt = null;
#[ORM\Column]
private ?\DateTimeImmutable $endAt = null;
#[ORM\Column]
private ?bool $active = null;
#[ORM\ManyToOne(inversedBy: 'memberships')]
#[ORM\JoinColumn(nullable: false)]
private ?Company $company = null;
public function __construct()
{
$this->active = true;
}
public function getId(): ?int
{
return $this->id;
}
public function getStartedAt(): ?\DateTimeImmutable
{
return $this->startedAt;
}
public function setStartedAt(\DateTimeImmutable $startedAt): self
{
$this->startedAt = $startedAt;
return $this;
}
public function getEndAt(): ?\DateTimeImmutable
{
return $this->endAt;
}
public function setEndAt(\DateTimeImmutable $endAt): self
{
$this->endAt = $endAt;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
}