src/Entity/ShoparticleBlockentry.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ShoparticleBlockentryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassShoparticleBlockentryRepository::class)]
  6. class ShoparticleBlockentry
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'shoparticleBlockentries')]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private ?Crop $crop null;
  15.     #[ORM\ManyToOne(inversedBy'shoparticleBlockentries')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Shoparticle $shoparticle null;
  18.     #[ORM\Column(type'datetime'nullablefalse)]
  19.     private ?\DateTimeInterface $created_at;
  20.     #[ORM\Column(type'datetime'nullabletrue)]
  21.     private ?\DateTimeInterface $updated_at null;
  22.     public function __construct() {
  23.         $this->created_at = new \DateTime();
  24.     }
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getCrop(): ?Crop
  30.     {
  31.         return $this->crop;
  32.     }
  33.     public function setCrop(?Crop $crop): static
  34.     {
  35.         $this->crop $crop;
  36.         return $this;
  37.     }
  38.     public function getShoparticle(): ?Shoparticle
  39.     {
  40.         return $this->shoparticle;
  41.     }
  42.     public function setShoparticle(?Shoparticle $shoparticle): static
  43.     {
  44.         $this->shoparticle $shoparticle;
  45.         return $this;
  46.     }
  47.     public function getCreatedAt(): ?\DateTimeInterface
  48.     {
  49.         return $this->created_at;
  50.     }
  51.     public function setCreatedAt(\DateTimeInterface $created_at): static
  52.     {
  53.         $this->created_at $created_at;
  54.         return $this;
  55.     }
  56.     public function getUpdatedAt(): ?\DateTimeInterface
  57.     {
  58.         return $this->updated_at;
  59.     }
  60.     public function setUpdatedAt(\DateTimeInterface $updated_at): static
  61.     {
  62.         $this->updated_at $updated_at;
  63.         return $this;
  64.     }
  65. }