<?php
namespace App\Entity\Core;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
#[ORM\Table('kvik_customization')]
#[ORM\Entity]
class KvikCustomization implements JsonSerializable
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private int $id;
/**
* @var string
*/
#[ORM\Column(name: 'type', type: 'text', length: 16)]
private string $type;
/**
* @var ?string
*/
#[ORM\Column(name: 'sub_type', type: 'text', length: 16, nullable: true)]
private ?string $subType;
/**
* @var string
*/
#[ORM\Column(name: 'variant', type: 'text', length: 64)]
private string $variant;
/**
* @var string
*/
#[ORM\Column(name: 'name', type: 'text', length: 64)]
private string $name;
/**
* @var ?int
*/
#[ORM\Column(name: 'price', type: 'integer', nullable: true)]
private ?int $price;
/**
* @var string
*/
#[ORM\Column(name: 'explicitly_allowed_classrooms', type: 'text', length: 64)]
private string $explicitlyAllowedClassrooms;
public function getExplicitlyAllowedClassrooms(): string
{
return $this->explicitlyAllowedClassrooms;
}
public function setExplicitlyAllowedClassrooms(string $explicitlyAllowedClassrooms): void
{
$this->explicitlyAllowedClassrooms = $explicitlyAllowedClassrooms;
}
public function getId(): int
{
return $this->id;
}
public function setId(int $id): void
{
$this->id = $id;
}
public function getType(): string
{
return $this->type;
}
public function setType(string $type): void
{
$this->type = $type;
}
public function getSubType(): ?string
{
return $this->subType;
}
public function setSubType(?string $subType): void
{
$this->subType = $subType;
}
public function getVariant(): string
{
return $this->variant;
}
public function setVariant(string $variant): void
{
$this->variant = $variant;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): void
{
$this->name = $name;
}
public function getPrice(): ?int
{
return $this->price;
}
public function setPrice(?int $price): void
{
$this->price = $price;
}
public function jsonSerialize(): array
{
return [
'id' => $this->id,
'type' => $this->type,
'subType' => $this->subType,
'variant' => $this->variant,
'name' => $this->name,
'price' => $this->price,
'explicitlyAllowedClassroomsArray' => explode(',', $this->explicitlyAllowedClassrooms)
];
}
}