<?php
namespace App\Entity;
use App\Repository\ShoparticleBlockentryRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ShoparticleBlockentryRepository::class)]
class ShoparticleBlockentry
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'shoparticleBlockentries')]
#[ORM\JoinColumn(nullable: false)]
private ?Crop $crop = null;
#[ORM\ManyToOne(inversedBy: 'shoparticleBlockentries')]
#[ORM\JoinColumn(nullable: false)]
private ?Shoparticle $shoparticle = null;
#[ORM\Column(type: 'datetime', nullable: false)]
private ?\DateTimeInterface $created_at;
#[ORM\Column(type: 'datetime', nullable: true)]
private ?\DateTimeInterface $updated_at = null;
public function __construct() {
$this->created_at = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getCrop(): ?Crop
{
return $this->crop;
}
public function setCrop(?Crop $crop): static
{
$this->crop = $crop;
return $this;
}
public function getShoparticle(): ?Shoparticle
{
return $this->shoparticle;
}
public function setShoparticle(?Shoparticle $shoparticle): static
{
$this->shoparticle = $shoparticle;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): static
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updated_at;
}
public function setUpdatedAt(\DateTimeInterface $updated_at): static
{
$this->updated_at = $updated_at;
return $this;
}
}