<?php
/**
* Created by simpson <simpsonwork@gmail.com>
* Date: 2019-03-19
* Time: 17:50
*/
namespace App\Entity;
use AngelGamez\TranslatableBundle\Entity\TranslatableValue;
//use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\ServiceRepository;
use Symfony\Component\Serializer\Annotation\Groups;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'services')]
#[ORM\Entity(repositoryClass: ServiceRepository::class)]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'profiles')]
class Service
{
#[ORM\Id]
#[ORM\Column(name: 'id', type: 'smallint')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[Groups('profile')]
protected int $id;
#[ORM\Column(name: '`group`', type: 'smallint')]
protected int $group;
#[ORM\Column(name: 'name', type: 'translatable')]
#[Groups('profile')]
protected TranslatableValue $name;
#[ORM\Column(name: 'uri_identity', type: 'string', length: 128)]
#[Groups('profile')]
protected string $uriIdentity;
public function __construct(TranslatableValue $name, string $uriIdentity, int $group)
{
$this->group = $group;
$this->name = $name;
$this->uriIdentity = $uriIdentity;
}
public function getId(): int
{
return $this->id;
}
public function getGroup(): int
{
return $this->group;
}
public function getName(): TranslatableValue
{
return $this->name;
}
public function getUriIdentity(): string
{
return $this->uriIdentity;
}
}