src/Entity/CropImage.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CropImageRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCropImageRepository::class)]
  7. class CropImage
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length50)]
  14.     private ?string $type null;
  15.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  16.     private ?string $text null;
  17.     #[ORM\ManyToOne]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Image $image null;
  20.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  21.     private ?\DateTimeInterface $created_at null;
  22.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  23.     private ?\DateTimeInterface $updated_at null;
  24.     #[ORM\ManyToOne(inversedBy'cropImages')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?Crop $crop null;
  27.     #[ORM\ManyToOne]
  28.     private ?User $user null;
  29.     public function __construct() {
  30.         $this->created_at = new \DateTime();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getType(): ?string
  37.     {
  38.         return $this->type;
  39.     }
  40.     public function setType(string $type): static
  41.     {
  42.         $this->type $type;
  43.         return $this;
  44.     }
  45.     public function getText(): ?string
  46.     {
  47.         return $this->text;
  48.     }
  49.     public function setText(?string $text): static
  50.     {
  51.         $this->text $text;
  52.         return $this;
  53.     }
  54.     public function getImage(): ?Image
  55.     {
  56.         return $this->image;
  57.     }
  58.     public function setImage(?Image $image): static
  59.     {
  60.         $this->image $image;
  61.         return $this;
  62.     }
  63.     public function getCreatedAt(): ?\DateTimeInterface
  64.     {
  65.         return $this->created_at;
  66.     }
  67.     public function setCreatedAt(\DateTimeInterface $created_at): static
  68.     {
  69.         $this->created_at $created_at;
  70.         return $this;
  71.     }
  72.     public function getUpdatedAt(): ?\DateTimeInterface
  73.     {
  74.         return $this->updated_at;
  75.     }
  76.     public function setUpdatedAt(?\DateTimeInterface $updated_at): static
  77.     {
  78.         $this->updated_at $updated_at;
  79.         return $this;
  80.     }
  81.     public function getCrop(): ?Crop
  82.     {
  83.         return $this->crop;
  84.     }
  85.     public function setCrop(?Crop $crop): static
  86.     {
  87.         $this->crop $crop;
  88.         return $this;
  89.     }
  90.     public function getUser(): ?User
  91.     {
  92.         return $this->user;
  93.     }
  94.     public function setUser(?User $user): static
  95.     {
  96.         $this->user $user;
  97.         return $this;
  98.     }
  99. }