48 lines
979 B
PHP
48 lines
979 B
PHP
<?php
|
|
/**
|
|
* Author: ykxiao
|
|
* Date: 2025/6/4
|
|
* Time: 下午2:54
|
|
* Description:
|
|
*
|
|
* (c) ykxiao <yk_9001@hotmail.com>
|
|
*
|
|
* This source file is subject to the MIT license that is bundled
|
|
* with this source code in the file LICENSE.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Request;
|
|
|
|
class RoleRequest extends AbstractRequest
|
|
{
|
|
public array $scenes = [
|
|
'addRole' => [
|
|
'id',
|
|
'role_name',
|
|
'active_status',
|
|
'sort',
|
|
],
|
|
];
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'id' => 'integer',
|
|
'role_name' => 'required|string',
|
|
'active_status' => 'required|integer',
|
|
'sort' => 'required|integer',
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'id' => '角色ID',
|
|
'role_name' => '角色名称',
|
|
'active_status' => '角色状态',
|
|
'sort' => '排序',
|
|
];
|
|
}
|
|
} |