src/Entity/Products.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use App\Entity\User as User;
  6. /**
  7.  * Products
  8.  *
  9.  * @ORM\Table()
  10.  * @ORM\Entity(repositoryClass="App\Repository\ProductsRepository")
  11.  */
  12. class Products
  13. {
  14.     /**
  15.      * @var integer
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="name", type="string", length=255)
  26.      */
  27.     private $name;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="category", type="string", length=255, nullable=true)
  32.      */
  33.     private ?string $category null;
  34.     public function __toString()
  35.     {
  36.         return "{$this->getName()}";
  37.     }
  38.     /**
  39.      * @var string
  40.      * @Gedmo\Slug(fields={"name"}, updatable=false)
  41.      * @ORM\Column(name="slug", type="string", length=255, unique=true)
  42.      */
  43.     private $slug;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="metaTitle", type="text", nullable=true)
  48.      */
  49.     private $metaTitle;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(name="metaKeywords", type="text", nullable=true)
  54.      */
  55.     private $metaKeywords;
  56.     /**
  57.      * @var string
  58.      *
  59.      * @ORM\Column(name="metaDescription", type="text", nullable=true)
  60.      */
  61.     private $metaDescription;
  62.     /**
  63.      * @var string
  64.      *
  65.      * @ORM\Column(name="title", type="string", length=255, nullable=true)
  66.      */
  67.     private $title;
  68.     /**
  69.      * @var string
  70.      *
  71.      * @ORM\Column(name="content", type="text", nullable=true)
  72.      */
  73.     private $content;
  74.     /**
  75.      * @var string
  76.      *
  77.      * @ORM\Column(name="features", type="text", nullable=true)
  78.      */
  79.     private $features;
  80.     /**
  81.      * @var float
  82.      *
  83.      * @ORM\Column(name="price", type="decimal", nullable=true)
  84.      */
  85.     private $price;
  86.     /**
  87.      * @var integer
  88.      *
  89.      * @ORM\Column(name="stock", type="integer", nullable=true)
  90.      */
  91.     private $stock;
  92.     /**
  93.      * @var string
  94.      *
  95.      * @ORM\Column(name="logo", type="string", length=255, nullable=true)
  96.      */
  97.     private $logo;
  98.     /**
  99.      * @var string
  100.      *
  101.      * @ORM\Column(name="bannerImage", type="string", length=255, nullable=true)
  102.      */
  103.     private $bannerImage;
  104.     /**
  105.      * @var string
  106.      *
  107.      * @ORM\Column(name="sliderImage", type="string", length=255, nullable=true)
  108.      */
  109.     private $sliderImage;
  110.     /**
  111.      * @var string
  112.      *
  113.      * @ORM\Column(name="sliderContent", type="text", nullable=true)
  114.      */
  115.     private $sliderContent;
  116.     /**
  117.      * @Gedmo\SortablePosition
  118.      * @ORM\Column(name="position", type="integer")
  119.      */
  120.     private $position;
  121.     /**
  122.      * @ORM\Column(name="publish", type="boolean", nullable=true)
  123.      */
  124.     private $publish false;
  125.     /**
  126.      * @Gedmo\Timestampable(on="create")
  127.      * @ORM\Column(type="datetime")
  128.      */
  129.     private $created;
  130.     /**
  131.      * @Gedmo\Timestampable(on="update")
  132.      * @ORM\Column(type="datetime")
  133.      */
  134.     private $updated;
  135.     /**
  136.      * @var User $createdBy
  137.      *
  138.      * @Gedmo\Blameable(on="create")
  139.      * @ORM\ManyToOne(targetEntity="User")
  140.      * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
  141.      */
  142.     private $createdBy;
  143.     /**
  144.      * @var User $updatedBy
  145.      *
  146.      * @Gedmo\Blameable(on="update")
  147.      * @ORM\ManyToOne(targetEntity="User")
  148.      * @ORM\JoinColumn(name="updated_by", referencedColumnName="id")
  149.      */
  150.     private $updatedBy;
  151.     /**
  152.      * Get id
  153.      *
  154.      * @return integer
  155.      */
  156.     public function getId()
  157.     {
  158.         return $this->id;
  159.     }
  160.     /**
  161.      * Set name
  162.      *
  163.      * @param string $name
  164.      * @return Products
  165.      */
  166.     public function setName($name)
  167.     {
  168.         $this->name $name;
  169.         return $this;
  170.     }
  171.     /**
  172.      * Get name
  173.      *
  174.      * @return string
  175.      */
  176.     public function getName()
  177.     {
  178.         return $this->name;
  179.     }
  180.     /**
  181.      * @return ?string
  182.      */
  183.     public function getCategory(): ?string
  184.     {
  185.         return $this->category;
  186.     }
  187.     /**
  188.      * @param ?string $category
  189.      *
  190.      * @return Products
  191.      */
  192.     public function setCategory(?string $category): Products
  193.     {
  194.         $this->category $category;
  195.         return $this;
  196.     }
  197.     /**
  198.      * Set features
  199.      *
  200.      * @param string $features
  201.      * @return Products
  202.      */
  203.     public function setFeatures($features)
  204.     {
  205.         $this->features $features;
  206.         return $this;
  207.     }
  208.     /**
  209.      * Get features
  210.      *
  211.      * @return string
  212.      */
  213.     public function getFeatures()
  214.     {
  215.         return $this->features;
  216.     }
  217.     /**
  218.      * Set price
  219.      *
  220.      * @param float $price
  221.      * @return Products
  222.      */
  223.     public function setPrice($price)
  224.     {
  225.         $this->price $price;
  226.         return $this;
  227.     }
  228.     /**
  229.      * Get price
  230.      *
  231.      * @return float
  232.      */
  233.     public function getPrice()
  234.     {
  235.         return $this->price;
  236.     }
  237.     /**
  238.      * Set stock
  239.      *
  240.      * @param integer $stock
  241.      * @return Products
  242.      */
  243.     public function setStock($stock)
  244.     {
  245.         $this->stock $stock;
  246.         return $this;
  247.     }
  248.     /**
  249.      * Get stock
  250.      *
  251.      * @return integer
  252.      */
  253.     public function getStock()
  254.     {
  255.         return $this->stock;
  256.     }
  257.     public function setSlug($slug)
  258.     {
  259.         $this->slug $slug;
  260.     }
  261.     /**
  262.      * Get slug
  263.      *
  264.      * @return string
  265.      */
  266.     public function getSlug()
  267.     {
  268.         return $this->slug;
  269.     }
  270.     /**
  271.      * Set created
  272.      *
  273.      * @param \DateTime $created
  274.      * @return Products
  275.      */
  276.     public function setCreated($created)
  277.     {
  278.         $this->created $created;
  279.         return $this;
  280.     }
  281.     /**
  282.      * Get created
  283.      *
  284.      * @return \DateTime
  285.      */
  286.     public function getCreated()
  287.     {
  288.         return $this->created;
  289.     }
  290.     /**
  291.      * Set updated
  292.      *
  293.      * @param \DateTime $updated
  294.      * @return Products
  295.      */
  296.     public function setUpdated($updated)
  297.     {
  298.         $this->updated $updated;
  299.         return $this;
  300.     }
  301.     /**
  302.      * Get updated
  303.      *
  304.      * @return \DateTime
  305.      */
  306.     public function getUpdated()
  307.     {
  308.         return $this->updated;
  309.     }
  310.     /**
  311.      * Get createdBy
  312.      *
  313.      * @return \App\Entity\User
  314.      */
  315.     public function getCreatedBy()
  316.     {
  317.         return $this->createdBy;
  318.     }
  319.     /**
  320.      * Get updatedBy
  321.      *
  322.      * @return \App\Entity\User
  323.      */
  324.     public function getUpdatedBy()
  325.     {
  326.         return $this->updatedBy;
  327.     }
  328.     /**
  329.      * Set createdBy
  330.      *
  331.      * @param \App\Entity\User $createdBy
  332.      *
  333.      * @return Products
  334.      */
  335.     public function setCreatedBy(\App\Entity\User $createdBy null)
  336.     {
  337.         $this->createdBy $createdBy;
  338.         return $this;
  339.     }
  340.     /**
  341.      * Set updatedBy
  342.      *
  343.      * @param \App\Entity\User $updatedBy
  344.      *
  345.      * @return Products
  346.      */
  347.     public function setUpdatedBy(\App\Entity\User $updatedBy null)
  348.     {
  349.         $this->updatedBy $updatedBy;
  350.         return $this;
  351.     }
  352.     /**
  353.      * Set metaTitle
  354.      *
  355.      * @param string $metaTitle
  356.      * @return Products
  357.      */
  358.     public function setMetaTitle($metaTitle)
  359.     {
  360.         $this->metaTitle $metaTitle;
  361.         return $this;
  362.     }
  363.     /**
  364.      * Get metaTitle
  365.      *
  366.      * @return string
  367.      */
  368.     public function getMetaTitle()
  369.     {
  370.         return $this->metaTitle;
  371.     }
  372.     /**
  373.      * Set metaKeywords
  374.      *
  375.      * @param string $metaKeywords
  376.      * @return Products
  377.      */
  378.     public function setMetaKeywords($metaKeywords)
  379.     {
  380.         $this->metaKeywords $metaKeywords;
  381.         return $this;
  382.     }
  383.     /**
  384.      * Get metaKeywords
  385.      *
  386.      * @return string
  387.      */
  388.     public function getMetaKeywords()
  389.     {
  390.         return $this->metaKeywords;
  391.     }
  392.     /**
  393.      * Set metaDescription
  394.      *
  395.      * @param string $metaDescription
  396.      * @return Products
  397.      */
  398.     public function setMetaDescription($metaDescription)
  399.     {
  400.         $this->metaDescription $metaDescription;
  401.         return $this;
  402.     }
  403.     /**
  404.      * Get metaDescription
  405.      *
  406.      * @return string
  407.      */
  408.     public function getMetaDescription()
  409.     {
  410.         return $this->metaDescription;
  411.     }
  412.     /**
  413.      * Set title
  414.      *
  415.      * @param string $title
  416.      * @return Products
  417.      */
  418.     public function setTitle($title)
  419.     {
  420.         $this->title $title;
  421.         return $this;
  422.     }
  423.     /**
  424.      * Get title
  425.      *
  426.      * @return string
  427.      */
  428.     public function getTitle()
  429.     {
  430.         return $this->title;
  431.     }
  432.     /**
  433.      * Set content
  434.      *
  435.      * @param string $content
  436.      * @return Products
  437.      */
  438.     public function setContent($content)
  439.     {
  440.         $this->content $content;
  441.         return $this;
  442.     }
  443.     /**
  444.      * Get content
  445.      *
  446.      * @return string
  447.      */
  448.     public function getContent()
  449.     {
  450.         return $this->content;
  451.     }
  452.     /**
  453.      * Set logo
  454.      *
  455.      * @param string $logo
  456.      * @return Products
  457.      */
  458.     public function setLogo($logo)
  459.     {
  460.         $this->logo $logo;
  461.         return $this;
  462.     }
  463.     /**
  464.      * Get logo
  465.      *
  466.      * @return string
  467.      */
  468.     public function getLogo()
  469.     {
  470.         return $this->logo;
  471.     }
  472.     /**
  473.      * Set bannerImage
  474.      *
  475.      * @param string $bannerImage
  476.      * @return Products
  477.      */
  478.     public function setBannerImage($bannerImage)
  479.     {
  480.         $this->bannerImage $bannerImage;
  481.         return $this;
  482.     }
  483.     /**
  484.      * Get bannerImage
  485.      *
  486.      * @return string
  487.      */
  488.     public function getBannerImage()
  489.     {
  490.         return $this->bannerImage;
  491.     }
  492.     /**
  493.      * Set sliderImage
  494.      *
  495.      * @param string $sliderImage
  496.      * @return Products
  497.      */
  498.     public function setSliderImage($sliderImage)
  499.     {
  500.         $this->sliderImage $sliderImage;
  501.         return $this;
  502.     }
  503.     /**
  504.      * Get sliderImage
  505.      *
  506.      * @return string
  507.      */
  508.     public function getSliderImage()
  509.     {
  510.         return $this->sliderImage;
  511.     }
  512.     /**
  513.      * Set sliderContent
  514.      *
  515.      * @param string $sliderContent
  516.      * @return Products
  517.      */
  518.     public function setSliderContent($sliderContent)
  519.     {
  520.         $this->sliderContent $sliderContent;
  521.         return $this;
  522.     }
  523.     /**
  524.      * Get sliderContent
  525.      *
  526.      * @return string
  527.      */
  528.     public function getSliderContent()
  529.     {
  530.         return $this->sliderContent;
  531.     }
  532.     /**
  533.      * @return mixed
  534.      */
  535.     public function getPosition()
  536.     {
  537.         return $this->position;
  538.     }
  539.     /**
  540.      * @param mixed $position
  541.      * @return Products
  542.      */
  543.     public function setPosition($position)
  544.     {
  545.         $this->position $position;
  546.         return $this;
  547.     }
  548.     /**
  549.      * @return bool
  550.      */
  551.     public function isPublish()
  552.     {
  553.         return $this->publish;
  554.     }
  555.     /**
  556.      * @param bool $publish
  557.      * @return Products
  558.      */
  559.     public function setPublish($publish)
  560.     {
  561.         $this->publish $publish;
  562.         return $this;
  563.     }
  564. }