<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\JoinColumn;
/**
* @ORM\Entity(repositoryClass="App\EntityRepo\ConsentRepo")
* @ORM\Table(name="consent")
* @Gedmo\TranslationEntity(class="App\Entity\ConsentTranslation")
*/
class Consent implements Translatable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $consentId=0;
/**
* @ORM\Column(type="string", length=100)
* @Gedmo\Translatable
*/
protected $consentName;
/**
* @ORM\Column(type="text", nullable=true)
* @Gedmo\Translatable
*/
protected $consentDescription;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $consentType='order';
/**
* @ORM\Column(type="integer", nullable=true)
*/
protected $priority=1;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
protected $status='active';
/**
* @ORM\Column(type="datetime", nullable=true, nullable=true)
*/
protected $dateInserted;
/**
* @ORM\Column(type="date", nullable=true, nullable=true)
*/
protected $dateValid;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $notes;
/**
* Post locale
* Used locale to override Translation listener's locale
*
* @Gedmo\Locale
*
*/
protected $locale;
/**
* @ORM\Column(type="datetime", nullable=true, nullable=true)
*/
protected $dateModified;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $doubleOpt = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $blockOrder = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
protected $active = true;
//#[ManyToOne(targetEntity: Contact::class, inversedBy: 'consents')]
//#[JoinColumn(name: 'contact_id', referencedColumnName: 'id')]
/*
* @ORM\ManyToMany(targetEntity="Contact", mappedBy="consents")
*/
//protected $contact;
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
public function getLocale()
{
return $this->locale;
}
public function getConsentId(): ?int
{
return $this->consentId;
}
public function getConsentName(): ?string
{
return $this->consentName;
}
public function setConsentName(string $consentName): static
{
$this->consentName = $consentName;
return $this;
}
public function getConsentDescription(): ?string
{
return $this->consentDescription;
}
public function setConsentDescription(?string $consentDescription): static
{
$this->consentDescription = $consentDescription;
return $this;
}
public function getConsentType(): ?string
{
return $this->consentType;
}
public function setConsentType(?string $consentType): static
{
$this->consentType = $consentType;
return $this;
}
public function getPriority(): ?int
{
return $this->priority;
}
public function setPriority(?int $priority): static
{
$this->priority = $priority;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): static
{
$this->status = $status;
return $this;
}
public function getDateInserted(): ?\DateTimeInterface
{
return $this->dateInserted;
}
public function setDateInserted(?\DateTimeInterface $dateInserted): static
{
$this->dateInserted = $dateInserted;
return $this;
}
public function getDateValid(): ?\DateTimeInterface
{
return $this->dateValid;
}
public function setDateValid(?\DateTimeInterface $dateValid): static
{
$this->dateValid = $dateValid;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): static
{
$this->notes = $notes;
return $this;
}
public function getDateModified(): ?\DateTimeInterface
{
return $this->dateModified;
}
public function setDateModified(?\DateTimeInterface $dateModified): static
{
$this->dateModified = $dateModified;
return $this;
}
public function isDoubleOpt(): ?bool
{
return $this->doubleOpt;
}
public function setDoubleOpt(?bool $doubleOpt): static
{
$this->doubleOpt = $doubleOpt;
return $this;
}
public function isBlockOrder(): ?bool
{
return $this->blockOrder;
}
public function setBlockOrder(?bool $blockOrder): static
{
$this->blockOrder = $blockOrder;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): static
{
$this->active = $active;
return $this;
}
}