src/Entity/Users/Adminuser/Parametreitem.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Users\Adminuser;
  3. use App\Entity\Users\User\User;
  4. use App\Repository\Users\Adminuser\ParametreitemRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\HttpFoundation\File\File;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. use App\Entity\Produit\Service\Article;
  9. /**
  10.  * @ORM\Table(name="`parametreitem`")
  11.  * @ORM\Entity(repositoryClass=ParametreitemRepository::class)
  12.  * @ORM\HasLifecycleCallbacks
  13.  * @Vich\Uploadable
  14.  */
  15. class Parametreitem
  16. {
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $typeParam;
  27.     /**
  28.      * @ORM\Column(type="datetime")
  29.      */
  30.     private $createdAt;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=Parametre::class)
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $parametre;
  36.     /**
  37.      * @ORM\Column(type="integer")
  38.      */
  39.     private $rang;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     public $contentUrl;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $filePath;
  48.     /**
  49.      * @Vich\UploadableField(mapping="file_parametre_item", fileNameProperty="filePath", size="imageSize", mimeType="mimeType", originalName="originalName")
  50.      * @var File|null
  51.      */
  52.     public ?File $file null;
  53.     /**
  54.      * @ORM\Column(type="string", length=255, nullable=true)
  55.      */
  56.     private $imageSize;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $originalName;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $mimeType;
  65.     /**
  66.      * @var text
  67.      *
  68.      * @ORM\Column(name="valeur", type="text", nullable=true)
  69.      */
  70.     private $valeur;
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity=User::class)
  73.      */
  74.     private $user;
  75.     /**
  76.      * @ORM\ManyToOne(targetEntity=Article::class)
  77.      */
  78.     private $article;
  79.     public function __construct()
  80.     {
  81.         $this->createdAt = new \Datetime();
  82.         $this->rang 0;
  83.     }
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getTypeParam(): ?string
  89.     {
  90.         return $this->typeParam;
  91.     }
  92.     public function setTypeParam(string $typeParam): self
  93.     {
  94.         $this->typeParam $typeParam;
  95.         return $this;
  96.     }
  97.     public function getCreatedAt(): ?\DateTimeInterface
  98.     {
  99.         return $this->createdAt;
  100.     }
  101.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  102.     {
  103.         $this->createdAt $createdAt;
  104.         return $this;
  105.     }
  106.     public function getParametre(): ?Parametre
  107.     {
  108.         return $this->parametre;
  109.     }
  110.     public function setParametre(?Parametre $parametre): self
  111.     {
  112.         $this->parametre $parametre;
  113.         return $this;
  114.     }
  115.     public function getRang(): ?int
  116.     {
  117.         return $this->rang;
  118.     }
  119.     public function setRang(int $rang): self
  120.     {
  121.         $this->rang $rang;
  122.         return $this;
  123.     }
  124.     public function getUser(): ?User
  125.     {
  126.         return $this->user;
  127.     }
  128.     public function setUser(?User $user): self
  129.     {
  130.         $this->user $user;
  131.         return $this;
  132.     }
  133.     public function getContentUrl(): ?string
  134.     {
  135.         return $this->contentUrl;
  136.     }
  137.     public function setContentUrl(?string $contentUrl): self
  138.     {
  139.         $this->contentUrl $contentUrl;
  140.         return $this;
  141.     }
  142.     public function getFilePath(): ?string
  143.     {
  144.         return $this->filePath;
  145.     }
  146.     public function setFilePath(?string $filePath): self
  147.     {
  148.         $this->filePath $filePath;
  149.         return $this;
  150.     }
  151.     public function getImageSize(): ?string
  152.     {
  153.         return $this->imageSize;
  154.     }
  155.     public function setImageSize(?string $imageSize): self
  156.     {
  157.         $this->imageSize $imageSize;
  158.         return $this;
  159.     }
  160.     public function getOriginalName(): ?string
  161.     {
  162.         return $this->originalName;
  163.     }
  164.     public function setOriginalName(?string $originalName): self
  165.     {
  166.         $this->originalName $originalName;
  167.         return $this;
  168.     }
  169.     public function getMimeType(): ?string
  170.     {
  171.         return $this->mimeType;
  172.     }
  173.     public function setMimeType(string $mimeType null): self
  174.     {
  175.         $this->mimeType $mimeType;
  176.         return $this;
  177.     }
  178.     /**
  179.      * Set valeur
  180.      *
  181.      * @param string $valeur
  182.      * @return Parametreadmin
  183.      */
  184.     public function setValeur($valeur)
  185.     {
  186.         $this->valeur $valeur;
  187.         return $this;
  188.     }
  189.     /**
  190.      * Get valeur
  191.      *
  192.      * @return string 
  193.      */
  194.     public function getValeur()
  195.     {
  196.         return $this->valeur;
  197.     }
  198.     public function getArticle(): ?Article
  199.     {
  200.         return $this->article;
  201.     }
  202.     public function setArticle(?Article $article): self
  203.     {
  204.         $this->article $article;
  205.         return $this;
  206.     }
  207. }