<?php
namespace App\Entity\Core;
use Doctrine\DBAL\Types\Types;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
/**
* Tools
*
* @ORM\Table("core_tools")
* @ORM\Entity(repositoryClass="App\Repository\Core\ToolsRepository")
* @ORM\HasLifecycleCallbacks()
*/
class Tools
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="created_at", type="date", nullable=true)
*/
private $createdAt;
/**
* @var string
*
* @ORM\Column(name="updated_at", type="date", nullable=true)
*/
private $updatedAt;
/**
* @var string
*
* @ORM\Column(name="title_page", type="string", length=255, nullable=true)
*/
private $titlePage;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=true)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $value;
/**
* @var integer
*
* @ORM\Column(name="sequence", type="integer", length=11, nullable=true)
*/
private $sequence;
/**
* @var string
*
* @ORM\Column(name="type", type="string", length=255, nullable=true)
*/
private $type;
/**
* @var string
*
* @ORM\Column(name="category", type="string", length=255, nullable=true)
*/
private $category;
/**
* @var string
*
* @ORM\Column(name="type_website", type="string", length=255, nullable=true)
*/
private $typeWebsite;
/**
* @var \Fiches
*
* @ORM\ManyToOne(targetEntity="App\Entity\Core\Tools")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="tool_id", referencedColumnName="id", nullable=true)
* })
*/
protected $tool;
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue(): void {
$this->setCreatedAt(new \DateTime("now"));
$this->setUpdatedAt(new \DateTime("now"));
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAtValue(): void {
$this->setUpdatedAt(new \DateTime("now"));
}
public function __toString() {
return $this->name;
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getTag(): ?string
{
return $this->tag;
}
public function setTag(string $tag): self
{
$this->tag = $tag;
return $this;
}
public function getTitlePage(): ?string
{
return $this->titlePage;
}
public function setTitlePage(string $titlePage): self
{
$this->titlePage = $titlePage;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(string $value): self
{
$this->value = $value;
return $this;
}
public function getSequence(): ?int
{
return $this->sequence;
}
public function setSequence(int $sequence): self
{
$this->sequence = $sequence;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(?string $category): self
{
$this->category = $category;
return $this;
}
public function getTypeWebsite(): ?string
{
return $this->typeWebsite;
}
public function setTypeWebsite(?string $type): self
{
$this->typeWebsite = $type;
return $this;
}
public function getTool(): ?self
{
return $this->tool;
}
public function setTool(?self $tool): self
{
$this->tool = $tool;
return $this;
}
}