Skip to content

Instantly share code, notes, and snippets.

@wilcorrea
Last active November 4, 2025 15:55
Show Gist options
  • Select an option

  • Save wilcorrea/f7bdf7b74479522bcc3a2cbd6ec73aa6 to your computer and use it in GitHub Desktop.

Select an option

Save wilcorrea/f7bdf7b74479522bcc3a2cbd6ec73aa6 to your computer and use it in GitHub Desktop.
<?php
declare(strict_types=1);
namespace App\Domain\Entity\Command;
use App\Domain\Enum\Type;
use Constructo\Support\Entity;
class EntityCommand extends Entity
{
public function __construct(
public readonly Type $type,
public readonly string $whatever,
) {
}
}
<?php
declare(strict_types=1);
namespace App\Domain\Entity;
use App\Domain\Entity\Command\EntityCommand;
use App\Domain\Enum\Type;
use DateTimeImmutable;
class EntityQuery extends EntityCommand
{
public function __construct(
public readonly int $id,
public readonly DateTimeImmutable $createdAt,
Type $type,
string $whatever,
) {
parent::__construct($type, $whatever);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment