mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 02:22:48 +08:00
feat(scheme): 新增数据库表结构同步方案
This commit is contained in:
21
extend/base/common/scheme/attribute/Index.php
Normal file
21
extend/base/common/scheme/attribute/Index.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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'
|
||||
) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user