<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use App\Entity\User as User;
/**
* Products
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="App\Repository\ProductsRepository")
*/
class Products
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="category", type="string", length=255, nullable=true)
*/
private ?string $category = null;
public function __toString()
{
return "{$this->getName()}";
}
/**
* @var string
* @Gedmo\Slug(fields={"name"}, updatable=false)
* @ORM\Column(name="slug", type="string", length=255, unique=true)
*/
private $slug;
/**
* @var string
*
* @ORM\Column(name="metaTitle", type="text", nullable=true)
*/
private $metaTitle;
/**
* @var string
*
* @ORM\Column(name="metaKeywords", type="text", nullable=true)
*/
private $metaKeywords;
/**
* @var string
*
* @ORM\Column(name="metaDescription", type="text", nullable=true)
*/
private $metaDescription;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
private $title;
/**
* @var string
*
* @ORM\Column(name="content", type="text", nullable=true)
*/
private $content;
/**
* @var string
*
* @ORM\Column(name="features", type="text", nullable=true)
*/
private $features;
/**
* @var float
*
* @ORM\Column(name="price", type="decimal", nullable=true)
*/
private $price;
/**
* @var integer
*
* @ORM\Column(name="stock", type="integer", nullable=true)
*/
private $stock;
/**
* @var string
*
* @ORM\Column(name="logo", type="string", length=255, nullable=true)
*/
private $logo;
/**
* @var string
*
* @ORM\Column(name="bannerImage", type="string", length=255, nullable=true)
*/
private $bannerImage;
/**
* @var string
*
* @ORM\Column(name="sliderImage", type="string", length=255, nullable=true)
*/
private $sliderImage;
/**
* @var string
*
* @ORM\Column(name="sliderContent", type="text", nullable=true)
*/
private $sliderContent;
/**
* @Gedmo\SortablePosition
* @ORM\Column(name="position", type="integer")
*/
private $position;
/**
* @ORM\Column(name="publish", type="boolean", nullable=true)
*/
private $publish = false;
/**
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime")
*/
private $created;
/**
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime")
*/
private $updated;
/**
* @var User $createdBy
*
* @Gedmo\Blameable(on="create")
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="created_by", referencedColumnName="id")
*/
private $createdBy;
/**
* @var User $updatedBy
*
* @Gedmo\Blameable(on="update")
* @ORM\ManyToOne(targetEntity="User")
* @ORM\JoinColumn(name="updated_by", referencedColumnName="id")
*/
private $updatedBy;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Products
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return ?string
*/
public function getCategory(): ?string
{
return $this->category;
}
/**
* @param ?string $category
*
* @return Products
*/
public function setCategory(?string $category): Products
{
$this->category = $category;
return $this;
}
/**
* Set features
*
* @param string $features
* @return Products
*/
public function setFeatures($features)
{
$this->features = $features;
return $this;
}
/**
* Get features
*
* @return string
*/
public function getFeatures()
{
return $this->features;
}
/**
* Set price
*
* @param float $price
* @return Products
*/
public function setPrice($price)
{
$this->price = $price;
return $this;
}
/**
* Get price
*
* @return float
*/
public function getPrice()
{
return $this->price;
}
/**
* Set stock
*
* @param integer $stock
* @return Products
*/
public function setStock($stock)
{
$this->stock = $stock;
return $this;
}
/**
* Get stock
*
* @return integer
*/
public function getStock()
{
return $this->stock;
}
public function setSlug($slug)
{
$this->slug = $slug;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set created
*
* @param \DateTime $created
* @return Products
*/
public function setCreated($created)
{
$this->created = $created;
return $this;
}
/**
* Get created
*
* @return \DateTime
*/
public function getCreated()
{
return $this->created;
}
/**
* Set updated
*
* @param \DateTime $updated
* @return Products
*/
public function setUpdated($updated)
{
$this->updated = $updated;
return $this;
}
/**
* Get updated
*
* @return \DateTime
*/
public function getUpdated()
{
return $this->updated;
}
/**
* Get createdBy
*
* @return \App\Entity\User
*/
public function getCreatedBy()
{
return $this->createdBy;
}
/**
* Get updatedBy
*
* @return \App\Entity\User
*/
public function getUpdatedBy()
{
return $this->updatedBy;
}
/**
* Set createdBy
*
* @param \App\Entity\User $createdBy
*
* @return Products
*/
public function setCreatedBy(\App\Entity\User $createdBy = null)
{
$this->createdBy = $createdBy;
return $this;
}
/**
* Set updatedBy
*
* @param \App\Entity\User $updatedBy
*
* @return Products
*/
public function setUpdatedBy(\App\Entity\User $updatedBy = null)
{
$this->updatedBy = $updatedBy;
return $this;
}
/**
* Set metaTitle
*
* @param string $metaTitle
* @return Products
*/
public function setMetaTitle($metaTitle)
{
$this->metaTitle = $metaTitle;
return $this;
}
/**
* Get metaTitle
*
* @return string
*/
public function getMetaTitle()
{
return $this->metaTitle;
}
/**
* Set metaKeywords
*
* @param string $metaKeywords
* @return Products
*/
public function setMetaKeywords($metaKeywords)
{
$this->metaKeywords = $metaKeywords;
return $this;
}
/**
* Get metaKeywords
*
* @return string
*/
public function getMetaKeywords()
{
return $this->metaKeywords;
}
/**
* Set metaDescription
*
* @param string $metaDescription
* @return Products
*/
public function setMetaDescription($metaDescription)
{
$this->metaDescription = $metaDescription;
return $this;
}
/**
* Get metaDescription
*
* @return string
*/
public function getMetaDescription()
{
return $this->metaDescription;
}
/**
* Set title
*
* @param string $title
* @return Products
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set content
*
* @param string $content
* @return Products
*/
public function setContent($content)
{
$this->content = $content;
return $this;
}
/**
* Get content
*
* @return string
*/
public function getContent()
{
return $this->content;
}
/**
* Set logo
*
* @param string $logo
* @return Products
*/
public function setLogo($logo)
{
$this->logo = $logo;
return $this;
}
/**
* Get logo
*
* @return string
*/
public function getLogo()
{
return $this->logo;
}
/**
* Set bannerImage
*
* @param string $bannerImage
* @return Products
*/
public function setBannerImage($bannerImage)
{
$this->bannerImage = $bannerImage;
return $this;
}
/**
* Get bannerImage
*
* @return string
*/
public function getBannerImage()
{
return $this->bannerImage;
}
/**
* Set sliderImage
*
* @param string $sliderImage
* @return Products
*/
public function setSliderImage($sliderImage)
{
$this->sliderImage = $sliderImage;
return $this;
}
/**
* Get sliderImage
*
* @return string
*/
public function getSliderImage()
{
return $this->sliderImage;
}
/**
* Set sliderContent
*
* @param string $sliderContent
* @return Products
*/
public function setSliderContent($sliderContent)
{
$this->sliderContent = $sliderContent;
return $this;
}
/**
* Get sliderContent
*
* @return string
*/
public function getSliderContent()
{
return $this->sliderContent;
}
/**
* @return mixed
*/
public function getPosition()
{
return $this->position;
}
/**
* @param mixed $position
* @return Products
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* @return bool
*/
public function isPublish()
{
return $this->publish;
}
/**
* @param bool $publish
* @return Products
*/
public function setPublish($publish)
{
$this->publish = $publish;
return $this;
}
}