24 lines
471 B
PHP
24 lines
471 B
PHP
<?php
|
|
|
|
namespace App\Domain\User;
|
|
|
|
use App\Framework\Database\Attributes\Column;
|
|
use App\Framework\Database\Attributes\Entity;
|
|
|
|
#[Entity(tableName: 'users')]
|
|
final readonly class User
|
|
{
|
|
public function __construct(
|
|
#[Column(name: 'id', primary: true)]
|
|
public string $id,
|
|
|
|
#[Column(name: 'name')]
|
|
public string $name,
|
|
|
|
#public ?string $email = null,
|
|
|
|
/*#[Column(name: 'email')]
|
|
public string $email*/
|
|
) {}
|
|
}
|