<?php
namespace MLDev\CatalogBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use MLDev\CatalogBundle\Repository\PriceRepository;
/**
* @ORM\Table(name="MLDev_Product_Price")
* @ORM\Entity(repositoryClass=PriceRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class Price
{
/**
* @var int
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="name", type="string", nullable=true)
*/
private $name;
/**
* @Gedmo\Slug(fields={"name"}, updatable=false, unique=true, separator="-")
* @ORM\Column(name="alias", type="string", length=255, nullable=false)
*/
private $alias;
/**
* @ORM\Column(name="basic", type="boolean", options={"default":"0"})
*/
private $basic = false;
/**
* @ORM\Column(name="syncIdentity", type="string", nullable=true)
*/
private $syncIdentity;
public function __construct(?string $name = null, ?string $syncIdentity = null)
{
$this->name = $name;
$this->syncIdentity = $syncIdentity;
}
public function __toString(): string
{
return (string)$this->getId();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name)
{
$this->name = $name;
}
public function getAlias(): ?string
{
return $this->alias;
}
public function setAlias(?string $alias): void
{
$this->alias = $alias;
}
public function getBasic(): ?bool
{
return $this->basic;
}
public function setBasic(?bool $basic): void
{
$this->basic = $basic;
}
public function getSyncIdentity(): ?string
{
return $this->syncIdentity;
}
public function setSyncIdentity(?string $syncIdentity): void
{
$this->syncIdentity = $syncIdentity;
}
}