20250731
This commit is contained in:
37
sources/attributes/FieldName.php
Normal file
37
sources/attributes/FieldName.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Отключаю несущественные инспекции (из-за Attribute)
|
||||
*
|
||||
* @noinspection PhpMultipleClassDeclarationsInspection
|
||||
*/
|
||||
|
||||
namespace goodboyalex\php_db_components_pack\attributes;
|
||||
|
||||
use Attribute;
|
||||
|
||||
/**
|
||||
* Атрибут указывающий имя поля в БД.
|
||||
*
|
||||
* @author Александр Бабаев
|
||||
* @package php_db_components_pack
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
#[Attribute(flags: Attribute::TARGET_PROPERTY)]
|
||||
final readonly class FieldName
|
||||
{
|
||||
/**
|
||||
* @var string $FieldName Имя поля.
|
||||
*/
|
||||
public string $FieldName;
|
||||
|
||||
/**
|
||||
* Конструктор.
|
||||
*
|
||||
* @param string $fieldName Имя поля.
|
||||
*/
|
||||
public function __construct (string $fieldName)
|
||||
{
|
||||
$this->FieldName = $fieldName;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user