src/Entity/Produit/Service/Detailarticle.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Produit\Service;
  3. use App\Repository\Produit\Service\DetailarticleRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. /**
  8.  * @ORM\Table(name="`detailarticle`")
  9.  * @ORM\Entity(repositoryClass=DetailarticleRepository::class)
  10.  * @ORM\HasLifecycleCallbacks
  11.  * @Vich\Uploadable
  12.  */
  13. class Detailarticle
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="datetime")
  23.      */
  24.     private $date;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     public $contentUrl;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $filePath;
  33.     /**
  34.      * @Vich\UploadableField(mapping="detail_article_file", fileNameProperty="filePath", size="imageSize", mimeType="mimeType", originalName="originalName")
  35.      * @var File|null
  36.      */
  37.     public ?File $file null;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $imageSize;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $originalName;
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private $mimeType;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $title;
  54.     /**
  55.      * @ORM\Column(type="text")
  56.      */
  57.     private $description;
  58.     /**
  59.      * @ORM\ManyToOne(targetEntity=Article::class)
  60.      * @ORM\JoinColumn(nullable=false)
  61.      */
  62.     private $article;
  63.     /**
  64.      * @ORM\Column(type="integer")
  65.      */
  66.     private $rang;
  67.     public function __construct()
  68.     {
  69.         $this->date = new \Datetime();
  70.         $this->rang 0;
  71.     }
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     public function getDate(): ?\DateTimeInterface
  77.     {
  78.         return $this->date;
  79.     }
  80.     public function setDate(\DateTimeInterface $date): self
  81.     {
  82.         $this->date $date;
  83.         return $this;
  84.     }
  85.     public function getTitle(): ?string
  86.     {
  87.         return $this->title;
  88.     }
  89.     public function setTitle(string $title): self
  90.     {
  91.         $this->title $title;
  92.         return $this;
  93.     }
  94.     public function getDescription(): ?string
  95.     {
  96.         return $this->description;
  97.     }
  98.     public function setDescription(string $description): self
  99.     {
  100.         $this->description $description;
  101.         return $this;
  102.     }
  103.     public function getArticle(): ?Article
  104.     {
  105.         return $this->article;
  106.     }
  107.     public function setArticle(?Article $article): self
  108.     {
  109.         $this->article $article;
  110.         return $this;
  111.     }
  112.     public function getRang(): ?int
  113.     {
  114.         return $this->rang;
  115.     }
  116.     public function setRang(int $rang): self
  117.     {
  118.         $this->rang $rang;
  119.         return $this;
  120.     }
  121.     public function getContentUrl(): ?string
  122.     {
  123.         return $this->contentUrl;
  124.     }
  125.     public function setContentUrl(?string $contentUrl): self
  126.     {
  127.         $this->contentUrl $contentUrl;
  128.         return $this;
  129.     }
  130.     public function getFilePath(): ?string
  131.     {
  132.         return $this->filePath;
  133.     }
  134.     public function setFilePath(?string $filePath): self
  135.     {
  136.         $this->filePath $filePath;
  137.         return $this;
  138.     }
  139.     public function getImageSize(): ?string
  140.     {
  141.         return $this->imageSize;
  142.     }
  143.     public function setImageSize(?string $imageSize): self
  144.     {
  145.         $this->imageSize $imageSize;
  146.         return $this;
  147.     }
  148.     public function getOriginalName(): ?string
  149.     {
  150.         return $this->originalName;
  151.     }
  152.     public function setOriginalName(?string $originalName): self
  153.     {
  154.         $this->originalName $originalName;
  155.         return $this;
  156.     }
  157.     public function getMimeType(): ?string
  158.     {
  159.         return $this->mimeType;
  160.     }
  161.     public function setMimeType(string $mimeType null): self
  162.     {
  163.         $this->mimeType $mimeType;
  164.         return $this;
  165.     }
  166. }