src/Entity/CompanyFav.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompanyFavRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassCompanyFavRepository::class)]
  6. class CompanyFav
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue(strategy'AUTO')]
  10.     #[ORM\Column(type'integer'uniquetrue)]
  11.     private $id;
  12.     #[ORM\Column(type'date')]
  13.     private $date;
  14.     #[ORM\ManyToOne(targetEntity'User'inversedBy"companyFavUsers")]
  15.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  16.     private $user;
  17.     #[ORM\ManyToOne(targetEntity'Company'inversedBy"companyFavCompanies")]
  18.     #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  19.     private $company;
  20.     /**
  21.      * @return mixed
  22.      */
  23.     public function getUser()
  24.     {
  25.         return $this->user;
  26.     }
  27.     /**
  28.      * @param mixed $user
  29.      */
  30.     public function setUser($user): void
  31.     {
  32.         $this->user $user;
  33.     }
  34.     /**
  35.      * @return mixed
  36.      */
  37.     public function getCompany()
  38.     {
  39.         return $this->company;
  40.     }
  41.     /**
  42.      * @param mixed $company
  43.      */
  44.     public function setCompany($company): void
  45.     {
  46.         $this->company $company;
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getDate(): ?\DateTimeInterface
  53.     {
  54.         return $this->date;
  55.     }
  56.     public function setDate(\DateTimeInterface $date): self
  57.     {
  58.         $this->date $date;
  59.         return $this;
  60.     }
  61. }