src/Entity/CRM/AgreementContractTemplateSet.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\CRM\AgreementContractTemplateSetRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassAgreementContractTemplateSetRepository::class)]
  9. class AgreementContractTemplateSet
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $versionLabel null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  18.     private ?\DateTimeInterface $validFrom null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  20.     private ?\DateTimeInterface $validTo null;
  21.     #[ORM\Column]
  22.     private ?bool $isActive null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  24.     private ?\DateTimeInterface $createdAt null;
  25.     #[ORM\ManyToOne(inversedBy'agreementContractTemplateSets')]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private ?Agreement $agreement null;
  28.     #[ORM\OneToMany(mappedBy'templateSet'targetEntityAgreementContractTemplate::class)]
  29.     private Collection $agreementContractTemplates;
  30.     public function __construct()
  31.     {
  32.         $this->agreementContractTemplates = new ArrayCollection();
  33.         $this->createdAt = new \DateTime();
  34.     }
  35.     public function __toString(): string
  36.     {
  37.         return $this->agreement.' - v'.$this->versionLabel;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getVersionLabel(): ?string
  44.     {
  45.         return $this->versionLabel;
  46.     }
  47.     public function setVersionLabel(string $versionLabel): static
  48.     {
  49.         $this->versionLabel $versionLabel;
  50.         return $this;
  51.     }
  52.     public function getValidFrom(): ?\DateTimeInterface
  53.     {
  54.         return $this->validFrom;
  55.     }
  56.     public function setValidFrom(\DateTimeInterface $validFrom): static
  57.     {
  58.         $this->validFrom $validFrom;
  59.         return $this;
  60.     }
  61.     public function getValidTo(): ?\DateTimeInterface
  62.     {
  63.         return $this->validTo;
  64.     }
  65.     public function setValidTo(?\DateTimeInterface $validTo): static
  66.     {
  67.         $this->validTo $validTo;
  68.         return $this;
  69.     }
  70.     public function isIsActive(): ?bool
  71.     {
  72.         return $this->isActive;
  73.     }
  74.     public function setIsActive(bool $isActive): static
  75.     {
  76.         $this->isActive $isActive;
  77.         return $this;
  78.     }
  79.     public function getCreatedAt(): ?\DateTimeInterface
  80.     {
  81.         return $this->createdAt;
  82.     }
  83.     public function setCreatedAt(\DateTimeInterface $createdAt): static
  84.     {
  85.         $this->createdAt $createdAt;
  86.         return $this;
  87.     }
  88.     public function getAgreement(): ?Agreement
  89.     {
  90.         return $this->agreement;
  91.     }
  92.     public function setAgreement(?Agreement $agreement): static
  93.     {
  94.         $this->agreement $agreement;
  95.         return $this;
  96.     }
  97.     public function getAgreementContractTemplates(): Collection
  98.     {
  99.         return $this->agreementContractTemplates;
  100.     }
  101.     public function setAgreementContractTemplates(Collection $agreementContractTemplates): void
  102.     {
  103.         $this->agreementContractTemplates $agreementContractTemplates;
  104.     }
  105. }