implermented key import
This commit is contained in:
parent
ace0de4063
commit
74e1b25fcf
20 changed files with 1035 additions and 12 deletions
39
src/php/Entities/Games/Key.php
Normal file
39
src/php/Entities/Games/Key.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace GamesShop\Entities\Games;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use GamesShop\Entities\Account\User;
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'keys')]
|
||||
final class Key
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(type: 'integer', options: ['unsigned' => true])]
|
||||
#[ORM\GeneratedValue]
|
||||
private int|null $id;
|
||||
#[ORM\ManyToOne]
|
||||
private Game $game;
|
||||
#[ORM\ManyToOne]
|
||||
private User $contributedUser;
|
||||
#[ORM\Column]
|
||||
private string $key;
|
||||
#[ORM\Column(type: 'string', enumType: Store::class)]
|
||||
private Store $store;
|
||||
#[ORM\Column(nullable: true)]
|
||||
private string|null $storeLink;
|
||||
#[ORM\Column]
|
||||
private string|null $fromWhere;
|
||||
|
||||
public function __construct(Game $game, User $contributedUser, string $key, Store $store, ?string $storeLink, ?string $fromWhere)
|
||||
{
|
||||
$this->game = $game;
|
||||
$this->contributedUser = $contributedUser;
|
||||
$this->key = $key;
|
||||
$this->store = $store;
|
||||
$this->storeLink = $storeLink;
|
||||
$this->fromWhere = $fromWhere;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue