src/Entity/Consent.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Gedmo\Translatable\Translatable;
  9. use Doctrine\ORM\Mapping\ManyToOne;
  10. use Doctrine\ORM\Mapping\JoinColumn;
  11. /**
  12.  * @ORM\Entity(repositoryClass="App\EntityRepo\ConsentRepo")
  13.  * @ORM\Table(name="consent")
  14.  * @Gedmo\TranslationEntity(class="App\Entity\ConsentTranslation")
  15.  */
  16. class Consent implements Translatable
  17. {
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */ 
  23.     protected $consentId=0;
  24.     
  25.     /**
  26.      * @ORM\Column(type="string", length=100)
  27.      * @Gedmo\Translatable     
  28.      */
  29.     protected $consentName
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      * @Gedmo\Translatable     
  33.      */
  34.     protected $consentDescription;  
  35.     /**
  36.      * @ORM\Column(type="string", length=100, nullable=true)
  37.      */
  38.     protected $consentType='order';
  39.     
  40.     /**
  41.      * @ORM\Column(type="integer", nullable=true)
  42.      */
  43.     protected $priority=1;   
  44.     
  45.     /**
  46.      * @ORM\Column(type="string", length=100, nullable=true)
  47.      */
  48.     protected $status='active';    
  49.     
  50.     /**
  51.      * @ORM\Column(type="datetime", nullable=true, nullable=true)
  52.      */
  53.     protected $dateInserted;
  54.     /**
  55.      * @ORM\Column(type="date", nullable=true, nullable=true)
  56.      */
  57.     protected $dateValid;    
  58.       
  59.     
  60.     /**
  61.      * @ORM\Column(type="text", nullable=true)
  62.      */
  63.     protected $notes;   
  64.     /**
  65.      * Post locale
  66.      * Used locale to override Translation listener's locale
  67.      *
  68.      * @Gedmo\Locale
  69.      * 
  70.      */
  71.     protected $locale;  
  72.     /**
  73.      * @ORM\Column(type="datetime", nullable=true, nullable=true)
  74.      */
  75.     protected $dateModified;   
  76.     /**
  77.      * @ORM\Column(type="boolean", nullable=true)
  78.      */
  79.     protected $doubleOpt false;  
  80.     /**
  81.      * @ORM\Column(type="boolean", nullable=true)
  82.      */
  83.     protected $blockOrder false;     
  84.     /**
  85.      * @ORM\Column(type="boolean", nullable=true)
  86.      */
  87.     protected $active true;
  88.     //#[ManyToOne(targetEntity: Contact::class, inversedBy: 'consents')]
  89.     //#[JoinColumn(name: 'contact_id', referencedColumnName: 'id')]
  90.     /*
  91.      * @ORM\ManyToMany(targetEntity="Contact", mappedBy="consents")
  92.      */
  93.     //protected $contact;
  94.     public function setLocale($locale)
  95.     {
  96.         $this->locale $locale;
  97.         return $this;
  98.     }
  99.     public function getLocale()
  100.     {
  101.         return $this->locale;
  102.     }
  103.     public function getConsentId(): ?int
  104.     {
  105.         return $this->consentId;
  106.     }
  107.     public function getConsentName(): ?string
  108.     {
  109.         return $this->consentName;
  110.     }
  111.     public function setConsentName(string $consentName): static
  112.     {
  113.         $this->consentName $consentName;
  114.         return $this;
  115.     }
  116.     public function getConsentDescription(): ?string
  117.     {
  118.         return $this->consentDescription;
  119.     }
  120.     public function setConsentDescription(?string $consentDescription): static
  121.     {
  122.         $this->consentDescription $consentDescription;
  123.         return $this;
  124.     }
  125.     public function getConsentType(): ?string
  126.     {
  127.         return $this->consentType;
  128.     }
  129.     public function setConsentType(?string $consentType): static
  130.     {
  131.         $this->consentType $consentType;
  132.         return $this;
  133.     }
  134.     public function getPriority(): ?int
  135.     {
  136.         return $this->priority;
  137.     }
  138.     public function setPriority(?int $priority): static
  139.     {
  140.         $this->priority $priority;
  141.         return $this;
  142.     }
  143.     public function getStatus(): ?string
  144.     {
  145.         return $this->status;
  146.     }
  147.     public function setStatus(?string $status): static
  148.     {
  149.         $this->status $status;
  150.         return $this;
  151.     }
  152.     public function getDateInserted(): ?\DateTimeInterface
  153.     {
  154.         return $this->dateInserted;
  155.     }
  156.     public function setDateInserted(?\DateTimeInterface $dateInserted): static
  157.     {
  158.         $this->dateInserted $dateInserted;
  159.         return $this;
  160.     }
  161.     public function getDateValid(): ?\DateTimeInterface
  162.     {
  163.         return $this->dateValid;
  164.     }
  165.     public function setDateValid(?\DateTimeInterface $dateValid): static
  166.     {
  167.         $this->dateValid $dateValid;
  168.         return $this;
  169.     }
  170.     public function getNotes(): ?string
  171.     {
  172.         return $this->notes;
  173.     }
  174.     public function setNotes(?string $notes): static
  175.     {
  176.         $this->notes $notes;
  177.         return $this;
  178.     }
  179.     public function getDateModified(): ?\DateTimeInterface
  180.     {
  181.         return $this->dateModified;
  182.     }
  183.     public function setDateModified(?\DateTimeInterface $dateModified): static
  184.     {
  185.         $this->dateModified $dateModified;
  186.         return $this;
  187.     }
  188.     public function isDoubleOpt(): ?bool
  189.     {
  190.         return $this->doubleOpt;
  191.     }
  192.     public function setDoubleOpt(?bool $doubleOpt): static
  193.     {
  194.         $this->doubleOpt $doubleOpt;
  195.         return $this;
  196.     }
  197.     public function isBlockOrder(): ?bool
  198.     {
  199.         return $this->blockOrder;
  200.     }
  201.     public function setBlockOrder(?bool $blockOrder): static
  202.     {
  203.         $this->blockOrder $blockOrder;
  204.         return $this;
  205.     }
  206.     public function isActive(): ?bool
  207.     {
  208.         return $this->active;
  209.     }
  210.     public function setActive(?bool $active): static
  211.     {
  212.         $this->active $active;
  213.         return $this;
  214.     }
  215. }