46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Domain\Channel;
|
||
|
|
|
||
|
|
use Doctrine\ORM\Mapping as ORM;
|
||
|
|
use Symfony\Component\Uid\Uuid;
|
||
|
|
|
||
|
|
#[ORM\Entity]
|
||
|
|
#[ORM\Table(name: 'platforms', schema: 'app')]
|
||
|
|
class Platform
|
||
|
|
{
|
||
|
|
#[ORM\Id]
|
||
|
|
#[ORM\Column(type: 'uuid')]
|
||
|
|
private Uuid $id;
|
||
|
|
|
||
|
|
#[ORM\Column(type: 'string', length: 100, unique: true)]
|
||
|
|
private string $type;
|
||
|
|
|
||
|
|
#[ORM\Column(type: 'string', length: 255)]
|
||
|
|
private string $label;
|
||
|
|
|
||
|
|
/** @var array<string, mixed> */
|
||
|
|
#[ORM\Column(type: 'json')]
|
||
|
|
private array $config = [];
|
||
|
|
|
||
|
|
public function __construct(string $type, string $label)
|
||
|
|
{
|
||
|
|
$this->id = Uuid::v7();
|
||
|
|
$this->type = $type;
|
||
|
|
$this->label = $label;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getId(): Uuid { return $this->id; }
|
||
|
|
public function getType(): string { return $this->type; }
|
||
|
|
public function getLabel(): string { return $this->label; }
|
||
|
|
public function setLabel(string $label): void { $this->label = $label; }
|
||
|
|
|
||
|
|
/** @return array<string, mixed> */
|
||
|
|
public function getConfig(): array { return $this->config; }
|
||
|
|
|
||
|
|
/** @param array<string, mixed> $config */
|
||
|
|
public function setConfig(array $config): void { $this->config = $config; }
|
||
|
|
}
|