src/Entity/Tas/Tas.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Tas;
  3. use App\Entity\User\User;
  4. use App\Repository\Tas\TasRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=TasRepository::class)
  8.  *
  9.  * @ORM\InheritanceType("SINGLE_TABLE")
  10.  * @ORM\DiscriminatorColumn(name="discr", type="string")
  11.  * @ORM\DiscriminatorMap({
  12.  *     "auto" = "TasAuto",
  13.  *     "draw" = "TasDraw",
  14.  * })
  15.  */
  16. abstract class Tas
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=User::class, cascade={"persist", "remove"})
  26.      */
  27.     private $user;
  28.     /**
  29.      * @ORM\Column(type="boolean")
  30.      */
  31.     private $isAddress;
  32.     /**
  33.      * @ORM\Column(type="datetime")
  34.      */
  35.     private $createdAt;
  36.     /**
  37.      * @ORM\Column(type="string", length=255)
  38.      */
  39.     private $apiCode;
  40.     public function __construct()
  41.     {
  42.         $this->createdAt = new \DateTime();
  43.     }
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getUser(): ?User
  49.     {
  50.         return $this->user;
  51.     }
  52.     public function setUser(?User $user): self
  53.     {
  54.         $this->user $user;
  55.         return $this;
  56.     }
  57.     public function getIsAddress(): ?bool
  58.     {
  59.         return $this->isAddress;
  60.     }
  61.     public function setIsAddress(bool $isAddress): self
  62.     {
  63.         $this->isAddress $isAddress;
  64.         return $this;
  65.     }
  66.     public function getCreatedAt(): ?\DateTimeInterface
  67.     {
  68.         return $this->createdAt;
  69.     }
  70.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  71.     {
  72.         $this->createdAt $createdAt;
  73.         return $this;
  74.     }
  75.     public function getApiCode(): ?string
  76.     {
  77.         return $this->apiCode;
  78.     }
  79.     public function setApiCode(string $apiCode): self
  80.     {
  81.         $this->apiCode $apiCode;
  82.         return $this;
  83.     }
  84. }