src/Flexy/ShopBundle/Entity/Shipping/Vehicle/BodyCondition.php line 12

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Shipping\Vehicle;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\Flexy\ShopBundle\Entity\Shipping\Vehicle\BodyConditionRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassBodyConditionRepository::class)]
  8. #[ApiResource()]
  9. class BodyCondition
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Columnnullabletrue)]
  16.     private ?string $frontImage null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $backImage null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $leftImage null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $rightImage null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string  $frontObservation null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string  $backObservation null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string  $leftObservation null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string  $rightObservation null;
  31.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  32.     private ?\DateTimeInterface $createdAt null;
  33.     #[ORM\ManyToOne(inversedBy'bodyConditions',cascade:["persist"])]
  34.     private ?ShippingVehicle $shippingVehicle null;
  35.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  36.     private ?string $frontImageBase64 null;
  37.     public function __construct()
  38.     {
  39.         $this->createdAt=new \DateTime();
  40.     }
  41.     public function __toString()
  42.     {
  43.         return (string)"Etat de ".$this->getShippingVehicle()." le ".$this->createdAt->format("d/m/Y H:i");
  44.     }
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getFrontImage(): ?string
  50.     {
  51.         return $this->frontImage;
  52.     }
  53.     public function setFrontImage(?string $frontImage): self
  54.     {
  55.         $this->frontImage $frontImage;
  56.         return $this;
  57.     }
  58.     public function getBackImage(): ?string
  59.     {
  60.         return $this->backImage;
  61.     }
  62.     public function setBackImage(?string $backImage): self
  63.     {
  64.         $this->backImage $backImage;
  65.         return $this;
  66.     }
  67.     public function getLeftImage(): ?string
  68.     {
  69.         return $this->leftImage;
  70.     }
  71.     public function setLeftImage(?string $leftImage): self
  72.     {
  73.         $this->leftImage $leftImage;
  74.         return $this;
  75.     }
  76.     public function getRightImage(): ?string
  77.     {
  78.         return $this->rightImage;
  79.     }
  80.     public function setRightImage(?string $rightImage): self
  81.     {
  82.         $this->rightImage $rightImage;
  83.         return $this;
  84.     }
  85.     /**
  86.      * Get the value of frontObservation
  87.      */ 
  88.     public function getFrontObservation()
  89.     {
  90.         return $this->frontObservation;
  91.     }
  92.     /**
  93.      * Set the value of frontObservation
  94.      *
  95.      * @return  self
  96.      */ 
  97.     public function setFrontObservation($frontObservation)
  98.     {
  99.         $this->frontObservation $frontObservation;
  100.         return $this;
  101.     }
  102.     /**
  103.      * Get the value of backObservation
  104.      */ 
  105.     public function getBackObservation()
  106.     {
  107.         return $this->backObservation;
  108.     }
  109.     /**
  110.      * Set the value of backObservation
  111.      *
  112.      * @return  self
  113.      */ 
  114.     public function setBackObservation($backObservation)
  115.     {
  116.         $this->backObservation $backObservation;
  117.         return $this;
  118.     }
  119.     /**
  120.      * Get the value of leftObservation
  121.      */ 
  122.     public function getLeftObservation()
  123.     {
  124.         return $this->leftObservation;
  125.     }
  126.     /**
  127.      * Set the value of leftObservation
  128.      *
  129.      * @return  self
  130.      */ 
  131.     public function setLeftObservation($leftObservation)
  132.     {
  133.         $this->leftObservation $leftObservation;
  134.         return $this;
  135.     }
  136.     /**
  137.      * Get the value of rightObservation
  138.      */ 
  139.     public function getRightObservation()
  140.     {
  141.         return $this->rightObservation;
  142.     }
  143.     /**
  144.      * Set the value of rightObservation
  145.      *
  146.      * @return  self
  147.      */ 
  148.     public function setRightObservation($rightObservation)
  149.     {
  150.         $this->rightObservation $rightObservation;
  151.         return $this;
  152.     }
  153.     public function getCreatedAt(): ?\DateTimeInterface
  154.     {
  155.         return $this->createdAt;
  156.     }
  157.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  158.     {
  159.         $this->createdAt $createdAt;
  160.         return $this;
  161.     }
  162.     public function getShippingVehicle(): ?ShippingVehicle
  163.     {
  164.         return $this->shippingVehicle;
  165.     }
  166.     public function setShippingVehicle(?ShippingVehicle $shippingVehicle): self
  167.     {
  168.         $this->shippingVehicle $shippingVehicle;
  169.         return $this;
  170.     }
  171.     public function getFrontImageBase64(): ?string
  172.     {
  173.         return $this->frontImageBase64;
  174.     }
  175.     public function setFrontImageBase64(?string $frontImageBase64): self
  176.     {
  177.         $this->frontImageBase64 $frontImageBase64;
  178.         return $this;
  179.     }
  180. }