初始化-安装依赖

This commit is contained in:
2026-03-03 10:06:12 +08:00
parent 3f349a35a4
commit ec8cac4221
187 changed files with 26292 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<?php
namespace plugin\saiadmin\service;
/**
* 权限注解
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS)]
class Permission
{
/**
* 权限标题/名称
*/
public string $title;
/**
* 权限标识唯一格式如module:controller:action
*/
public ?string $slug = null;
/**
* 构造函数 #[Permission(title:'标题', slug:'标识')]
* @param string|null $title
* @param string|null $slug
*/
public function __construct(
?string $title = null,
?string $slug = null,
)
{
$this->title = $title ?? '';
$this->slug = $slug;
}
/**
* 获取权限标题
*/
public function getTitle(): string
{
return $this->title;
}
/**
* 获取权限标识
*/
public function getSlug(): ?string
{
return $this->slug;
}
}