src/Entity/Publicity.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PublicityRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table(name'publicity')]
  6. #[ORM\Entity(repositoryClassPublicityRepository::class)]
  7. class Publicity {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private ?int $id null;
  12.     #[ORM\Column(name'title'type'string'length255)]
  13.     private string $title;
  14.     #[ORM\Column(name'createdDate'type'datetime')]
  15.     private \DateTime $createdDate;
  16.     #[ORM\Column(name'closedDate'type'datetime')]
  17.     private \DateTime $closedDate;
  18.     #[ORM\ManyToOne(targetEntityCompany::class, inversedBy'publicities')]
  19.     #[ORM\JoinColumn(name'id_company'referencedColumnName'id')]
  20.     private Company $company;
  21.     #[ORM\ManyToOne(targetEntityImage::class, inversedBy'publicities')]
  22.     #[ORM\JoinColumn(name'id_image'referencedColumnName'id')]
  23.     private Image $image;
  24.     public function getId(): ?int {
  25.         return $this->id;
  26.     }
  27.     public function setTitle(string $title): static {
  28.         $this->title $title;
  29.         return $this;
  30.     }
  31.     public function getTitle(): string {
  32.         return $this->title;
  33.     }
  34.     public function setCreatedDate(\DateTime $createdDate): static {
  35.         $this->createdDate $createdDate;
  36.         return $this;
  37.     }
  38.     public function getCreatedDate(): \DateTime {
  39.         return $this->createdDate;
  40.     }
  41.     public function setClosedDate(\DateTime $closedDate): static {
  42.         $this->closedDate $closedDate;
  43.         return $this;
  44.     }
  45.     public function getClosedDate(): \DateTime {
  46.         return $this->closedDate;
  47.     }
  48.     public function setCompany(Company $company): static {
  49.         $this->company $company;
  50.         return $this;
  51.     }
  52.     public function getCompany(): Company {
  53.         return $this->company;
  54.     }
  55.     public function getImage(): Image {
  56.         return $this->image;
  57.     }
  58.     public function setImage(Image $image): void {
  59.         $this->image $image;
  60.     }
  61. }