src/Entity/Shop.php line 16
<?phpnamespace App\Entity;use App\Entity\Trait\MainTranslationTrait;use App\Entity\Translation\ShopTranslation;use App\Repository\ShopRepository;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;use Gedmo\Translatable\Translatable;use Symfony\Component\Serializer\Annotation\Groups;use JsonSerializable;#[ORM\Table(name: 'shop')]#[ORM\Entity(repositoryClass: ShopRepository::class)]#[Gedmo\TranslationEntity(class: ShopTranslation::class)]class Shop implements Translatable,JsonSerializable{use MainTranslationTrait;const TRANSLATION_ENTITY = ShopTranslation::class;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: 'string', nullable: true)]#[Gedmo\Translatable]#[Groups("shop:read")]private ?string $title = null;#[ORM\Column(type: 'float', nullable: true)]#[Groups("shop:read")]private ?float $price = null;#[ORM\Column(type: 'float', nullable: true)]#[Groups("shop:read")]private ?float $discountedPrice = null;#[Groups("shop:read")]#[ORM\Column(type: 'string', nullable: true)]private ?string $image = null;public function getId(): ?int{return $this->id;}public function __toString(): string{return $this->title ?? "";}public function getTitle(): ?string{return $this->title;}public function setTitle(?string $title): static{$this->title = $title;return $this;}public function getPrice(): ?float{return $this->price;}public function setPrice(?float $price): static{$this->price = $price;return $this;}public function getDiscountedPrice(): ?float{return $this->discountedPrice;}public function setDiscountedPrice(?float $discountedPrice): static{$this->discountedPrice = $discountedPrice;return $this;}public function getImage(): ?string{return $this->image;}public function setImage(?string $image): static{$this->image = $image;return $this;}public function jsonSerialize(): array{return ['id' => $this->id,'title' => $this->title,'price' => $this->price,'discountedPrice' => $this->discountedPrice,'image' => $this->image,];}}