初始化本地仓库
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '管理员表单',
|
||||
description: '管理员创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class AdminFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_admin,user_name')]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
description: '真实姓名',
|
||||
type: 'string',
|
||||
example: '系统管理员',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $real_name;
|
||||
|
||||
#[OA\Property(
|
||||
description: '密码',
|
||||
type: 'string',
|
||||
example: '123456',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|min:6|max:20')]
|
||||
public string $password;
|
||||
|
||||
#[OA\Property(
|
||||
description: '手机号码',
|
||||
type: 'string',
|
||||
example: '18888888888',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'mobile|nullable')]
|
||||
public ?string $mobile_phone = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '邮箱',
|
||||
type: 'string',
|
||||
example: 'admin@example.com',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'email|nullable')]
|
||||
public ?string $email = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门ID',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:1')]
|
||||
public int $dept_id;
|
||||
|
||||
#[OA\Property(
|
||||
description: '角色ID列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'integer'),
|
||||
example: [1, 2],
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|array|min:1')]
|
||||
public array $role_id_list;
|
||||
|
||||
#[OA\Property(
|
||||
description: '岗位ID列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'integer'),
|
||||
example: [1],
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'array|nullable')]
|
||||
public ?array $post_id_list = null;
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'SysAdminQueryParam',
|
||||
title: '用户列表查询请求',
|
||||
description: '用户列表接口的查询过滤参数'
|
||||
)]
|
||||
class AdminQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '返回数据格式(normal|tree|table_tree|select)',
|
||||
type: 'string',
|
||||
default: 'normal',
|
||||
enum: ['normal', 'tree', 'table_tree', 'select'],
|
||||
example: 'normal'
|
||||
)]
|
||||
public string $format = 'normal';
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
description: '查询字段',
|
||||
type: 'string',
|
||||
default: '*',
|
||||
example: 'id,user_name,real_name'
|
||||
)]
|
||||
public string $field = '*';
|
||||
|
||||
#[OA\Property(
|
||||
description: '排序字段',
|
||||
type: 'string',
|
||||
default: 'create_time',
|
||||
example: 'create_time desc'
|
||||
)]
|
||||
public string $order = 'create_time';
|
||||
|
||||
#[OA\Property(
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $user_name = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '真实姓名',
|
||||
type: 'string',
|
||||
example: '管理员',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $real_name = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '手机号码',
|
||||
type: 'string',
|
||||
example: '18888888888',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $mobile_phone = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '邮箱',
|
||||
type: 'string',
|
||||
example: 'admin@example.com',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $email = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $status = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门ID',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $dept_id = null;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置表单',
|
||||
description: '配置创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class ConfigFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置编码',
|
||||
type: 'string',
|
||||
example: 'site_name',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_config,code')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置名称',
|
||||
type: 'string',
|
||||
example: '网站名称',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置内容',
|
||||
type: 'mixed',
|
||||
example: '我的网站',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required')]
|
||||
public mixed $content;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否启用(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置描述',
|
||||
type: 'string',
|
||||
example: '网站名称配置项',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $description = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '排序',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'integer|min:0|nullable')]
|
||||
public ?int $sort = null;
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '分组配置查询',
|
||||
description: '获取分组配置接口的请求参数'
|
||||
)]
|
||||
class ConfigGroupQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否只获取启用的配置项',
|
||||
type: 'boolean',
|
||||
example: true,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $enabled_only = true;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否包含配置项的完整元数据',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $with_metadata = false;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否包含配置项的描述信息',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $with_description = false;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否对配置项进行排序',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $sort_configs = false;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置项过滤,多个配置编码用逗号分隔',
|
||||
type: 'string',
|
||||
example: 'site_name,site_url',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:200|nullable')]
|
||||
public ?string $config_filter = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否返回默认值(当配置项不存在时)',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $with_defaults = false;
|
||||
|
||||
#[OA\Property(
|
||||
description: '默认值映射(JSON格式)',
|
||||
type: 'string',
|
||||
example: '{"site_name":"默认网站名称","site_url":"http://localhost"}',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'json|nullable')]
|
||||
public ?string $default_values = null;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置查询',
|
||||
description: '配置查询接口的请求参数'
|
||||
)]
|
||||
class ConfigQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $group_code = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置名称',
|
||||
type: 'string',
|
||||
example: '网站名称',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:100|nullable')]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否只获取启用的配置项',
|
||||
type: 'boolean',
|
||||
example: true,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $enabled_only = true;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否包含配置项的完整元数据',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $with_metadata = false;
|
||||
|
||||
#[OA\Property(
|
||||
description: '分组过滤,多个分组用逗号分隔',
|
||||
type: 'string',
|
||||
example: 'site,oss',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:200|nullable')]
|
||||
public ?string $group_filter = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '按指定字段作为键名(code 或 id)',
|
||||
type: 'string',
|
||||
enum: ['code', 'id'],
|
||||
example: 'code',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:code,id|nullable')]
|
||||
public ?string $key_by = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否对分组进行排序',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $sort_groups = false;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否对配置项进行排序',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $sort_configs = false;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置值操作',
|
||||
description: '配置值获取和更新接口的请求参数'
|
||||
)]
|
||||
class ConfigValueRequest extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '配置项编码',
|
||||
type: 'string',
|
||||
example: 'site_config',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置键',
|
||||
type: 'string',
|
||||
example: 'site_name',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $key;
|
||||
|
||||
#[OA\Property(
|
||||
description: '配置值',
|
||||
type: 'mixed',
|
||||
example: '我的网站',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'nullable')]
|
||||
public mixed $value = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否强制创建配置项',
|
||||
type: 'boolean',
|
||||
example: false,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'boolean|nullable')]
|
||||
public ?bool $force_create = false;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(title: '问题反馈表单', description: '问题反馈创建和编辑参数')]
|
||||
class FeedbackFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(property: 'type', description: '反馈类型', type: 'string', enum: ['bug', 'suggestion', 'correction'], example: 'bug')]
|
||||
#[ValidationRules(rules: 'required|string|in:bug,suggestion,correction')]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(property: 'content', description: '问题描述', type: 'string', example: '扫码后页面提示请求失败')]
|
||||
#[ValidationRules(rules: 'required|string|max:2000')]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(property: 'contact', description: '联系方式', type: 'string', example: 'user@example.com', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:100')]
|
||||
public ?string $contact = null;
|
||||
|
||||
#[OA\Property(property: 'images', description: '截图附件地址数组', type: 'array', items: new OA\Items(type: 'string'), nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|array')]
|
||||
public ?array $images = null;
|
||||
|
||||
#[OA\Property(property: 'source', description: '反馈来源', type: 'string', enum: ['app', 'web'], example: 'app')]
|
||||
#[ValidationRules(rules: 'required|string|in:app,web')]
|
||||
public string $source;
|
||||
|
||||
#[OA\Property(property: 'reply_content', description: '管理员回复内容', type: 'string', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:2000')]
|
||||
public ?string $reply_content = null;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(title: '问题反馈查询', description: '问题反馈列表查询参数')]
|
||||
class FeedbackQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(property: 'LIKE_content', description: '问题描述关键词', type: 'string', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:2000')]
|
||||
public ?string $LIKE_content = null;
|
||||
|
||||
#[OA\Property(property: 'LIKE_contact', description: '联系方式关键词', type: 'string', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:100')]
|
||||
public ?string $LIKE_contact = null;
|
||||
|
||||
#[OA\Property(property: 'EQ_type', description: '反馈类型', type: 'string', enum: ['bug', 'suggestion', 'correction'], nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|in:bug,suggestion,correction')]
|
||||
public ?string $EQ_type = null;
|
||||
|
||||
#[OA\Property(property: 'EQ_source', description: '反馈来源', type: 'string', enum: ['app', 'web'], nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|in:app,web')]
|
||||
public ?string $EQ_source = null;
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '菜单表单',
|
||||
description: '系统菜单创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class MenuFormRequest extends BaseFormRequest
|
||||
{
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '菜单类型(1菜单 2按钮 3接口)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 2,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:1,2,3')]
|
||||
public int $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'pid',
|
||||
description: '父菜单ID(0为顶级菜单)',
|
||||
type: 'string',
|
||||
example: '242218273067237379',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $pid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '菜单标题',
|
||||
type: 'string',
|
||||
example: '智能问答',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '菜单编码',
|
||||
type: 'string',
|
||||
example: 'ai:chat',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_menu,code,' . 'id' . ',id')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '路由路径',
|
||||
type: 'string',
|
||||
example: '/ai/agent',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'component',
|
||||
description: '前端组件路径',
|
||||
type: 'string',
|
||||
example: '/ai/agent/index',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $component;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'open_type',
|
||||
description: '打开方式(0当前页 1新窗口)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $open_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'icon',
|
||||
description: '菜单图标',
|
||||
type: 'string',
|
||||
example: 'mingcute:kakao-talk-line',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $icon;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 999,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:-1000|max:1000')]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_show',
|
||||
description: '是否显示(1显示 0隐藏)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $is_show;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_sync',
|
||||
description: '是否同步路由(1同步 0不同步)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $is_sync;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_cache',
|
||||
description: '是否缓存(1缓存 0不缓存)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $is_cache;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '菜单列表查询请求',
|
||||
description: '菜单列表接口的查询过滤参数'
|
||||
)]
|
||||
class MenuQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '菜单类型(1菜单 2按钮 3接口)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:1,2,3|nullable')]
|
||||
public ?int $type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '菜单标题',
|
||||
type: 'string',
|
||||
example: '系统管理',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $title = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '权限标识',
|
||||
type: 'string',
|
||||
example: 'system:menu:list',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:100|nullable')]
|
||||
public ?string $code = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '路由地址',
|
||||
type: 'string',
|
||||
example: '/system/menu',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $path = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $enabled = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '模块市场查询请求',
|
||||
description: '远程获取模块市场列表的查询过滤参数'
|
||||
)]
|
||||
class ModuleMarketQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '模块类型(module: 系统模块, plugin: 插件)',
|
||||
type: 'string',
|
||||
enum: ['module', 'plugin'],
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:module,plugin|nullable')]
|
||||
public ?string $type = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $status = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '搜索关键词',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $keyword = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否已安装(0:未安装,1:已安装)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $installed = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '数据回收站列表查询请求',
|
||||
description: '数据回收站列表接口的查询过滤参数'
|
||||
)]
|
||||
class RecycleBinQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'table_name',
|
||||
description: '数据表名',
|
||||
type: 'string',
|
||||
example: 'sys_user'
|
||||
)]
|
||||
#[ValidationRules('trim|max:50')]
|
||||
public ?string $table_name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'original_id',
|
||||
description: '原始数据ID',
|
||||
type: 'string',
|
||||
example: '232593675996626944'
|
||||
)]
|
||||
#[ValidationRules('trim|max:32')]
|
||||
public ?string $original_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否已还原(0=未还原,1=已还原)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
#[ValidationRules('in:0,1')]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'start_time',
|
||||
description: '创建开始时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-01T00:00:00Z'
|
||||
)]
|
||||
#[ValidationRules('dateFormat:Y-m-d H:i:s')]
|
||||
public ?string $start_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'end_time',
|
||||
description: '创建结束时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-31T23:59:59Z'
|
||||
)]
|
||||
#[ValidationRules('dateFormat:Y-m-d H:i:s|after:start_time')]
|
||||
public ?string $end_time = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '角色表单',
|
||||
description: '系统角色创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class RoleFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '角色名称',
|
||||
type: 'string',
|
||||
maxLength: 30,
|
||||
example: '管理员'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:30|unique:sys_role,name')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
description: '角色编码',
|
||||
type: 'string',
|
||||
maxLength: 100,
|
||||
example: 'ADMIN'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100|unique:sys_role,code')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '数据范围(1:全部数据 2:自定义 3:本部门 4:本部门及以下 5:本人)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3, 4, 5],
|
||||
example: 1
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|in:1,2,3,4,5')]
|
||||
public int $data_scope;
|
||||
|
||||
#[OA\Property(
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|between:0,999')]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(1:启用 0:禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|in:0,1')]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
description: '权限ID列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'integer'),
|
||||
example: [1, 2, 3]
|
||||
)]
|
||||
#[ValidationRules(rules: 'array|nullable|each:integer|each:min:1')]
|
||||
public ?array $permissions = [];
|
||||
|
||||
#[OA\Property(
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
maxLength: 255,
|
||||
example: '系统管理员角色'
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $remark = null;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '角色列表查询请求',
|
||||
description: '角色列表接口的查询过滤参数'
|
||||
)]
|
||||
class RoleQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '角色编码',
|
||||
type: 'string',
|
||||
example: 'ADMIN'
|
||||
)]
|
||||
public ?string $code = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '角色名称',
|
||||
type: 'string',
|
||||
example: '管理员'
|
||||
)]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '角色状态(1:启用 0:禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public ?int $enabled = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
use madong\swagger\schema\BaseRequestDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: 'Excel下载请求', description: '下载导出的Excel文件')]
|
||||
class UploadDownloadExcelRequest extends BaseRequestDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '文件路径',
|
||||
type: 'string',
|
||||
example: 'export/20240512/report.xlsx'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:255')]
|
||||
public string $file_path;
|
||||
|
||||
#[OA\Property(
|
||||
description: '下载文件名',
|
||||
type: 'string',
|
||||
example: '数据报表.xlsx'
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:100|nullable')]
|
||||
public ?string $file = null;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use madong\swagger\schema\BaseRequestDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(title: '网络图片下载请求', description: '通过URL下载网络图片')]
|
||||
class UploadDownloadNetworkImageRequest extends BaseRequestDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '图片URL',
|
||||
type: 'string',
|
||||
format: 'uri',
|
||||
example: 'https://example.com/image.jpg'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|url|max:512')]
|
||||
public string $url;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
namespace app\adminapi\schema\request\system;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '文件上传列表查询请求',
|
||||
description: '文件上传列表接口的查询过滤参数'
|
||||
)]
|
||||
class UploadQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'filename',
|
||||
description: '存储文件名',
|
||||
type: 'string',
|
||||
example: '42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public ?string $filename = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'original_filename',
|
||||
description: '原始文件名',
|
||||
type: 'string',
|
||||
example: 'logo.png'
|
||||
)]
|
||||
public ?string $original_filename = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ext',
|
||||
description: '文件扩展名',
|
||||
type: 'string',
|
||||
example: 'png'
|
||||
)]
|
||||
public ?string $ext = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'platform',
|
||||
description: '存储平台',
|
||||
type: 'string',
|
||||
enum: ['local', 'oss', 'cos', 's3'],
|
||||
example: 'local'
|
||||
)]
|
||||
public ?string $platform = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'start_time',
|
||||
description: '上传开始时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-01T00:00:00Z'
|
||||
)]
|
||||
public ?string $start_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'end_time',
|
||||
description: '上传结束时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-31T23:59:59Z'
|
||||
)]
|
||||
public ?string $end_time = null;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user