<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use App\Util\UUIDGeneratorUtil;/** * TypePoint * @ORM\Table(name="type_point") * @ORM\HasLifecycleCallbacks() * @ORM\Entity(repositoryClass="App\Repository\TypePointRepository") */class TypePoint { const TYPE_LOCAL = 1; const TYPE_GLOBAL = 2; const TYPE_CUSTOM = 3; const WORK_AS_LOCAL = 1; const WORK_AS_GLOBAl = 2; const WORK_AS_CUSTOM = 3; /** * @var integer * @ORM\Column(name="tp_id", type="guid") * @ORM\Id * @ORM\GeneratedValue(strategy="NONE") */ private $id; /** * @var integer * @ORM\Column(name="tp_type", type="integer") */ private $type; /** * @var string * @ORM\Column(name="tp_name", type="string") */ private $name; /** * @var string * @ORM\Column(name="tp_description", type="text") */ private $description; /** * @var \DateTime * @ORM\Column(name="tp_date_created", type="datetime") */ private $dateCreated; /** * @var decimal * @ORM\Column(name="tp_cash_ratio", type="decimal", precision=15, scale=6) */ private $cashRatio; /** * @var integer * @ORM\Column(name="tp_work_as", type="integer") */ private $workAs; /** * @return type */ public function getId() { return $this->id; } /** * @return type */ public function getWorkAs() { return $this->workAs; } /** * @param type $workAs */ public function setWorkAs($workAs) { $this->workAs = $workAs; } /** * @return type */ public function getType() { return $this->type; } /** * @return type */ public function getName() { return $this->name; } /** * @return type */ public function getDescription() { return $this->description; } /** * @return \DateTime */ public function getDateCreated(): \DateTime { return $this->dateCreated; } /** * @return type */ public function getCashRatio() { return $this->cashRatio; } /** * @param type $id */ public function setId($id) { $this->id = $id; } /** * @param type $type */ public function setType($type) { $this->type = $type; } /** * @param type $name */ public function setName($name) { $this->name = $name; } /** * @param type $description */ public function setDescription($description) { $this->description = $description; } /** * @param \DateTime $dateCreated */ public function setDateCreated(\DateTime $dateCreated) { $this->dateCreated = $dateCreated; } /** * @param type $cashRatio */ public function setCashRatio($cashRatio) { $this->cashRatio = $cashRatio; } /** * @ORM\PrePersist */ public function syncPrePersist() { if (!$this->id) { $newUUID = UUIDGeneratorUtil::getUUIDv4(); $this->setId($newUUID); } } /** * @return type */ public function showEverything() { return get_object_vars($this); }}