Files
ulthon_admin/extend/base/common/scheme/attribute/Index.php
2026-01-09 21:08:51 +08:00

22 lines
532 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace base\common\scheme\attribute;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]
class Index
{
/**
* @param string|array $columns 索引包含的列,单个字符串或数组
* @param string $name 索引名称,留空则自动生成
* @param string $type 索引类型NORMAL, UNIQUE, FULLTEXT
*/
public function __construct(
public string|array $columns,
public string $name = '',
public string $type = 'NORMAL'
) {
}
}