src/Entity/Service.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by simpson <simpsonwork@gmail.com>
  4.  * Date: 2019-03-19
  5.  * Time: 17:50
  6.  */
  7. namespace App\Entity;
  8. use AngelGamez\TranslatableBundle\Entity\TranslatableValue;
  9. //use ApiPlatform\Core\Annotation\ApiResource;
  10. use App\Repository\ServiceRepository;
  11. use Symfony\Component\Serializer\Annotation\Groups;
  12. use Doctrine\ORM\Mapping as ORM;
  13. #[ORM\Table(name'services')]
  14. #[ORM\Entity(repositoryClassServiceRepository::class)]
  15. #[ORM\Cache(usage'NONSTRICT_READ_WRITE'region'profiles')]
  16. class Service
  17. {
  18.     #[ORM\Id]
  19.     #[ORM\Column(name'id'type'smallint')]
  20.     #[ORM\GeneratedValue(strategy'AUTO')]
  21.     #[Groups('profile')]
  22.     protected int $id;
  23.     #[ORM\Column(name'`group`'type'smallint')]
  24.     protected int $group;
  25.     #[ORM\Column(name'name'type'translatable')]
  26.     #[Groups('profile')]
  27.     protected TranslatableValue $name;
  28.     #[ORM\Column(name'uri_identity'type'string'length128)]
  29.     #[Groups('profile')]
  30.     protected string $uriIdentity;
  31.     public function __construct(TranslatableValue $namestring $uriIdentityint $group)
  32.     {
  33.         $this->group $group;
  34.         $this->name $name;
  35.         $this->uriIdentity $uriIdentity;
  36.     }
  37.     public function getId(): int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getGroup(): int
  42.     {
  43.         return $this->group;
  44.     }
  45.     public function getName(): TranslatableValue
  46.     {
  47.         return $this->name;
  48.     }
  49.     public function getUriIdentity(): string
  50.     {
  51.         return $this->uriIdentity;
  52.     }
  53. }