src/Entity/Tag.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\World;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity]
  6. #[ORM\Table(name"tag")]
  7. class Tag
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\Column(type'uuid'uniquetrue)]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityWorld::class)]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private $world;
  15.     #[ORM\Column(type"string"length255)]
  16.     private $name;
  17.     #[ORM\Column(type"text"nullabletrue)]
  18.     private $description;
  19.     #[ORM\Column(type"string"length255nullabletrue)]
  20.     private $shortDescription;
  21.     #[ORM\Column(type"string"length50)]
  22.     private $type;
  23.     public function __construct(
  24.         string $name,
  25.         ?string $description null,
  26.         ?string $shortDescription null,        
  27.     )
  28.     {
  29.         $this->name $name;
  30.         $this->description $description;
  31.         $this->shortDescription $shortDescription;
  32.         $this->type 0;
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getName(): string
  39.     {
  40.         return $this->name;
  41.     }
  42.     public function getDescription(): ?string
  43.     {
  44.         return $this->description;
  45.     }
  46.     public function setDescription(?string $description): self
  47.     {
  48.         $this->description $description;
  49.         return $this;
  50.     }
  51.     public function getShortDescription(): ?string
  52.     {
  53.         return $this->shortDescription;
  54.     }
  55.     public function setShortDescription(?string $shortDescription): self
  56.     {
  57.         $this->shortDescription $shortDescription;
  58.         return $this;
  59.     }
  60.     public function getType(): ?string
  61.     {
  62.         return $this->type;
  63.     }
  64.     public function setType(string $type): self
  65.     {
  66.         $this->type $type;
  67.         return $this;
  68.     }
  69.     public function setName(string $name): self
  70.     {
  71.         $this->name $name;
  72.         return $this;
  73.     }
  74.     public function getWorld(): ?World
  75.     {
  76.         return $this->world;
  77.     }
  78.     public function setWorld(?World $world): self
  79.     {
  80.         $this->world $world;
  81.         return $this;
  82.     }
  83. }