- New code generation made for CLI

This commit is contained in:
mcndave committed 2026-01-05 12:39:41 +00:00
1 parent ae212a4377
commit c3e3d6a73a
22 files changed
+1067 -17

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
<?php
namespace %NAMESPACE%\%ENTITY_NS%;
use Ulmus\{
Attribute\IndexTypeEnum,
Attribute\Obj\Table,
Attribute\Property\Field,
Attribute\Property\Index,
Attribute\Property\OrderBy,
Attribute\Property\Relation,
Attribute\Property\Virtual,
Entity\EntityInterface,
EntityCollection,
Entity\Field\Datetime,
Repository,
SearchRequest,
};
use Ulmus\SearchRequest\Attribute\SearchWhere;
use Notes\Attribute\Ignore;
use %NAMESPACE%\Lib;
#[Table(name: "%CLASSNAME_LC%")]
class %CLASSNAME% implements \JsonSerializable, EntityInterface
{
use Lib\EntityTrait;
#[Field\Id]
public int $id;
#[Ignore]
public static function searchRequest(...$arguments) : SearchRequest\SearchRequestInterface
{
return new #[SearchRequest\Attribute\SearchRequestParameter(%CLASSNAME%::class)] class(... $arguments) extends SearchRequest\SearchRequest {
#[SearchWhere(parameter: [ '%CLASSNAME_LC%_id', 'id' ], source: SearchRequest\Attribute\PropertyValueSource::RequestAttribute)]
public int $id;
};
}
}