初始化本地仓库
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<?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;
|
||||
|
||||
use madong\swagger\schema\BaseRequestDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '第三方登录请求',
|
||||
description: '第三方登录请求参数'
|
||||
)]
|
||||
class ThirdPartyLoginRequest extends BaseRequestDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '账套',
|
||||
type: 'string',
|
||||
example: '669e3705b3d7de'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $acct_id;
|
||||
|
||||
#[OA\Property(
|
||||
description: '授权应用ID',
|
||||
type: 'string',
|
||||
example: '285191_1fbo28uL6prUQ90J5YTP2dSL6vx71tqv'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $app_id;
|
||||
|
||||
#[OA\Property(
|
||||
description: '应用秘钥',
|
||||
type: 'string',
|
||||
example: '8439b36501df4f6185f521781d6b7328'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $app_secret;
|
||||
|
||||
#[OA\Property(
|
||||
description: '授权登录用户名',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $user_name;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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\crontab;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务执行请求',
|
||||
description: '定时任务手动执行接口参数'
|
||||
)]
|
||||
class CrontabExecuteRequest extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '任务ID',
|
||||
type: 'string',
|
||||
example: 1
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:1')]
|
||||
public int|string $data;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?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\crontab;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务表单',
|
||||
description: '定时任务创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class CrontabFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '任务类型',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'task_cycle',
|
||||
description: '任务周期',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $task_cycle;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'singleton',
|
||||
description: '是否单例执行',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $singleton;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '任务标题',
|
||||
type: 'string',
|
||||
example: '数据备份任务'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'hour',
|
||||
description: '小时',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $hour;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'minute',
|
||||
description: '分钟',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $minute;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'target',
|
||||
description: '执行目标',
|
||||
type: 'string',
|
||||
example: 'app\command\Backup::run'
|
||||
)]
|
||||
public string $target;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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\crontab;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务日志查询请求',
|
||||
description: '定时任务日志列表查询过滤参数'
|
||||
)]
|
||||
class CrontabLogQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '日志ID',
|
||||
type: 'string',
|
||||
example: '123456789012345678'
|
||||
)]
|
||||
public ?string $id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'crontab_id',
|
||||
description: '定时任务ID',
|
||||
type: 'string',
|
||||
example: '987654321098765432'
|
||||
)]
|
||||
public ?string $crontab_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'target',
|
||||
description: '执行目标',
|
||||
type: 'string',
|
||||
example: 'app\command\Backup::run'
|
||||
)]
|
||||
public ?string $target = null;
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'return_code',
|
||||
description: '返回码',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public ?int $return_code = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'running_time',
|
||||
description: '运行时间(秒)',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public ?int $running_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-05-12T10:30:00Z'
|
||||
)]
|
||||
public ?string $created_at = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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\crontab;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务列表查询请求',
|
||||
description: '定时任务列表查询过滤参数'
|
||||
)]
|
||||
class CrontabQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '任务类型',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public ?int $type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'task_cycle',
|
||||
description: '任务周期',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public ?int $task_cycle = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'singleton',
|
||||
description: '是否单例执行',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public ?int $singleton = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '任务标题',
|
||||
type: 'string',
|
||||
example: '数据备份任务'
|
||||
)]
|
||||
public ?string $title = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'target',
|
||||
description: '执行目标',
|
||||
type: 'string',
|
||||
example: 'app\command\Backup::run'
|
||||
)]
|
||||
public ?string $target = null;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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\crontab;
|
||||
|
||||
|
||||
use madong\swagger\schema\BaseRequestDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务状态变更请求',
|
||||
description: '暂停/恢复定时任务'
|
||||
)]
|
||||
class CrontabStatusRequest extends BaseRequestDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '任务ID',
|
||||
type: 'string',
|
||||
example: 1
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:1')]
|
||||
public int|string $data;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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\dict;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典表单',
|
||||
description: '字典创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class DictFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '字典编码',
|
||||
type: 'string',
|
||||
example: 'status',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_dict,code')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '字典名称',
|
||||
type: 'string',
|
||||
example: '状态字典',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_dict,name')]
|
||||
public string $name;
|
||||
|
||||
#[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: '排序号',
|
||||
type: 'integer',
|
||||
example: 100,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:0|max:999')]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: '系统状态字典',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $remark = null;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<?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\dict;
|
||||
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典项表单',
|
||||
description: '字典项创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class DictItemFormRequest extends BaseFormRequest
|
||||
{
|
||||
|
||||
#[OA\Property(
|
||||
description: '字典ID',
|
||||
type: 'string',
|
||||
example: '242218273104986112',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $dict_id;
|
||||
|
||||
#[OA\Property(
|
||||
description: '选项标签',
|
||||
type: 'string',
|
||||
example: '所属分组',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $label;
|
||||
|
||||
#[OA\Property(
|
||||
description: '选项值',
|
||||
type: 'string',
|
||||
example: 'default',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_dict_item,value,dict_id,' . 'id' . ',id')]
|
||||
public string $value;
|
||||
|
||||
#[OA\Property(
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:0|max:999')]
|
||||
public int $sort;
|
||||
|
||||
#[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: '#4CAF50',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:20|nullable')]
|
||||
public ?string $color = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '扩展信息',
|
||||
type: 'object',
|
||||
nullable: true,
|
||||
example: '{"icon": "el-icon-setting"}'
|
||||
)]
|
||||
#[ValidationRules(rules: 'array|nullable')]
|
||||
public ?array $ext = null;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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\dict;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典项列表查询请求',
|
||||
description: '字典项列表接口的查询过滤参数'
|
||||
)]
|
||||
class DictItemQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '字典ID',
|
||||
type: 'string',
|
||||
example: '242218273104986112',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|nullable')]
|
||||
public ?string $dict_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '选项标签',
|
||||
type: 'string',
|
||||
example: '所属分组',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $label = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '选项值',
|
||||
type: 'string',
|
||||
example: 'default',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $value = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $enabled = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?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\dict;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典列表查询请求',
|
||||
description: '字典列表接口的查询过滤参数'
|
||||
)]
|
||||
class DictQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '字典编码',
|
||||
type: 'string',
|
||||
example: 'status',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $code = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '字典名称',
|
||||
type: 'string',
|
||||
example: '状态字典',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $status = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '排序字段',
|
||||
type: 'string',
|
||||
default: 'sort asc',
|
||||
example: 'sort asc'
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|nullable')]
|
||||
public ?string $order = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '返回数据格式(normal|tree|select)',
|
||||
type: 'string',
|
||||
default: 'normal',
|
||||
enum: ['normal', 'tree', 'select'],
|
||||
example: 'normal'
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:normal,tree,select|nullable')]
|
||||
public ?string $format = null;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?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\gateway;
|
||||
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '限访规则表单',
|
||||
description: '限访规则创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class RateLimiterFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '规则名称',
|
||||
type: 'string',
|
||||
example: 'customized'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'match_type',
|
||||
description: '匹配类型',
|
||||
type: 'string',
|
||||
example: 'allow'
|
||||
)]
|
||||
public string $match_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'methods',
|
||||
description: '请求方法(多个用逗号分隔,如:GET,POST)',
|
||||
type: 'string',
|
||||
example: 'GET'
|
||||
)]
|
||||
public string $methods;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '请求路径',
|
||||
type: 'string',
|
||||
example: '/system/menu'
|
||||
)]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'limit_value',
|
||||
description: '限制次数',
|
||||
type: 'integer',
|
||||
example: 60
|
||||
)]
|
||||
public int $limit_value;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'period',
|
||||
description: '限制周期(秒)',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $period;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'message',
|
||||
description: '触发限制时提示消息',
|
||||
type: 'string',
|
||||
example: '请求频繁'
|
||||
)]
|
||||
public string $message;
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<?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\gateway;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '限访规则列表查询请求',
|
||||
description: '限访规则接口查询过滤参数'
|
||||
)]
|
||||
class RateLimiterQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '规则ID',
|
||||
type: 'string',
|
||||
example: '247298887944531968',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '规则名称(模糊匹配)',
|
||||
type: 'string',
|
||||
example: 'customized',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'match_type',
|
||||
description: '匹配类型',
|
||||
type: 'string',
|
||||
example: 'allow',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $match_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'methods',
|
||||
description: '请求方法',
|
||||
type: 'string',
|
||||
example: 'GET',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $methods = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '请求路径(模糊匹配)',
|
||||
type: 'string',
|
||||
example: '/system/menu',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $path = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'limit_value',
|
||||
description: '限制次数',
|
||||
type: 'integer',
|
||||
example: 60,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $limit_value = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'period',
|
||||
description: '限制周期(秒)',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $period = null;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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\gateway;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '限访名单表单',
|
||||
description: '限访名单创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class RateRestrictionsFormRequest extends BaseFormRequest
|
||||
{
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '名单名称',
|
||||
type: 'string',
|
||||
example: ""
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: 'IP地址(留空表示不限IP)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $ip = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'priority',
|
||||
description: '优先级(数值越大优先级越高)',
|
||||
type: 'integer',
|
||||
example: 100
|
||||
)]
|
||||
public int $priority;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'methods',
|
||||
description: '请求方法(多个用逗号分隔,如:GET,POST)',
|
||||
type: 'string',
|
||||
example: "GET"
|
||||
)]
|
||||
public string $methods;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '请求路径',
|
||||
type: 'string',
|
||||
example: "/system/menu"
|
||||
)]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'message',
|
||||
description: '限制提示消息',
|
||||
type: 'string',
|
||||
example: "限制访问"
|
||||
)]
|
||||
public string $message;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'start_time',
|
||||
description: '生效开始时间(UTC格式,如:2025-11-13T00:00:00Z)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $start_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'end_time',
|
||||
description: '生效结束时间(UTC格式,如:2025-11-14T00:00:00Z)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $end_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注信息',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark = 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\gateway;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '限访名单列表查询请求',
|
||||
description: '限访名单列表接口查询过滤参数'
|
||||
)]
|
||||
class RateRestrictionsQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '名单ID',
|
||||
type: 'string',
|
||||
example: "247306532294254592",
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '名单名称(模糊匹配)',
|
||||
type: 'string',
|
||||
example: "sss",
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: 'IP地址(模糊匹配)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $ip = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'methods',
|
||||
description: '请求方法',
|
||||
type: 'string',
|
||||
example: "GET",
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $methods = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '请求路径(模糊匹配)',
|
||||
type: 'string',
|
||||
example: "/system/menu",
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $path = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'priority',
|
||||
description: '优先级',
|
||||
type: 'integer',
|
||||
example: 100,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $priority = null;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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\login;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '登录请求',
|
||||
description: '登录请求参数'
|
||||
)]
|
||||
class LoginRequest extends BaseResponseDTO
|
||||
{
|
||||
|
||||
#[OA\Property(
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin',
|
||||
nullable: true,
|
||||
)]
|
||||
#[ValidationRules(rules: 'sometimes|string|max:50')]
|
||||
public ?string $user_name = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '密码',
|
||||
type: 'string',
|
||||
example: '123456',
|
||||
nullable: true,
|
||||
)]
|
||||
#[ValidationRules(rules: 'sometimes|string')]
|
||||
public ?string $password = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '手机号码',
|
||||
type: 'string',
|
||||
example: '18888888888',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'sometimes|mobile')]
|
||||
public ?string $mobile_phone = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '验证码',
|
||||
type: 'string',
|
||||
example: '1234',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'sometimes|string|length:4,6')]
|
||||
public ?string $code = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '验证码UUID',
|
||||
type: 'string',
|
||||
example: 'a3bb6c8c-9b12-467b-acbf-3a3c2ecd2d2f',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'sometimes|uuid')]
|
||||
public ?string $uuid = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '登录类型',
|
||||
type: 'string',
|
||||
default: 'admin',
|
||||
example: 'admin'
|
||||
)]
|
||||
#[ValidationRules(rules: 'default:admin|string|max:20')]
|
||||
public string $type = 'admin';
|
||||
|
||||
#[OA\Property(
|
||||
description: '授权类型',
|
||||
type: 'string',
|
||||
default: 'default',
|
||||
enum: ['default', 'sms', 'refresh_token'],
|
||||
example: 'default'
|
||||
)]
|
||||
#[ValidationRules(rules: 'default:default|in:default,sms,refresh_token')]
|
||||
public string $grant_type = 'default';
|
||||
|
||||
#[OA\Property(
|
||||
description: '公钥ID',
|
||||
type: 'string',
|
||||
example: '8119456a6fa4dfe32d01d84fc195ad23',
|
||||
nullable: true,
|
||||
)]
|
||||
#[ValidationRules(rules: 'sometimes|string|max:100')]
|
||||
public ?string $key_id = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?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\logs;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '登录日志列表查询请求',
|
||||
description: '登录日志列表接口的查询过滤参数'
|
||||
)]
|
||||
class LoginLogQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $username = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '登录IP',
|
||||
type: 'string',
|
||||
example: '192.168.1.1',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $ipaddr = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '登录状态(0失败 1成功)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $status = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '开始时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-01-01 00:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date_format:Y-m-d H:i:s|nullable')]
|
||||
public ?string $start_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '结束时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-01-31 23:59:59',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date_format:Y-m-d H:i:s|nullable|after:start_time')]
|
||||
public ?string $end_time = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?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\logs;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '操作日志列表查询请求',
|
||||
description: '操作日志列表接口的查询过滤参数'
|
||||
)]
|
||||
class OperateLogQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '操作用户',
|
||||
type: 'string',
|
||||
example: 'admin',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $user_name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '操作名称',
|
||||
type: 'string',
|
||||
example: '数据字典',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:100|nullable')]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'method',
|
||||
description: '请求方法',
|
||||
type: 'string',
|
||||
enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
|
||||
example: 'GET',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|in:GET,POST,PUT,DELETE,PATCH|nullable')]
|
||||
public ?string $method = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '操作IP',
|
||||
type: 'string',
|
||||
example: '220.165.172.45',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|ip|nullable')]
|
||||
public ?string $ip = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'start_date',
|
||||
description: '操作开始日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
example: '2025-10-01',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date|nullable')]
|
||||
public ?string $start_date = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'end_date',
|
||||
description: '操作结束日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
example: '2025-10-31',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date|after_or_equal:start_date|nullable')]
|
||||
public ?string $end_date = null;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\member;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
|
||||
|
||||
/**
|
||||
* 会员表单请求DTO
|
||||
*/
|
||||
class MemberFormRequest extends BaseFormRequest
|
||||
{
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
public string $username;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
public ?string $email = null;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
public ?string $phone = null;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
public ?string $password = null;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
public ?string $nickname = null;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
public ?string $avatar = null;
|
||||
|
||||
/**
|
||||
* 等级ID
|
||||
*/
|
||||
public int $level_id = 1;
|
||||
|
||||
/**
|
||||
* 积分
|
||||
*/
|
||||
public int $points = 0;
|
||||
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
public float $balance = 0;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
public int $gender = 0;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
public ?string $birthday = null;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
public int $status = 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\member;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
|
||||
|
||||
/**
|
||||
* 会员查询请求DTO
|
||||
*/
|
||||
class MemberQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
public ?string $username = null;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
public ?string $email = null;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
public ?string $phone = null;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
public ?int $status = null;
|
||||
|
||||
/**
|
||||
* 等级ID
|
||||
*/
|
||||
public ?int $level_id = null;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
public ?string $order_by = null;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
*/
|
||||
public ?string $order_dir = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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\message;
|
||||
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '消息表单',
|
||||
description: '消息创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class MessageFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '消息类型(如公告、通知等)',
|
||||
type: 'string',
|
||||
example: 'announcement',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '消息标题',
|
||||
type: 'string',
|
||||
example: '系统升级维护通知',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '消息内容',
|
||||
type: 'string',
|
||||
example: '系统将于2023-12-31 23:00进行维护升级,预计持续2小时',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sender_id',
|
||||
description: '发送者ID(关联管理员表)',
|
||||
type: 'string',
|
||||
example: '987654321098765432',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $sender_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'receiver_id',
|
||||
description: '接收者ID(关联管理员表,0表示全员)',
|
||||
type: 'string',
|
||||
example: '567890123456789012',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $receiver_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '消息状态(0=未读,1=已读)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|in:0,1')]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'priority',
|
||||
description: '优先级(1=低,2=中,3=高)',
|
||||
type: 'integer',
|
||||
example: 3,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|between:1,3')]
|
||||
public int $priority;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'channel',
|
||||
description: '发送渠道(如system=系统内,email=邮件)',
|
||||
type: 'string',
|
||||
example: 'system',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:20')]
|
||||
public string $channel;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'related_id',
|
||||
description: '关联业务ID(如订单ID、任务ID)',
|
||||
type: 'string',
|
||||
example: '456789012345678901',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:32|nullable')]
|
||||
public ?string $related_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'related_type',
|
||||
description: '关联业务类型(如order=订单,task=任务)',
|
||||
type: 'string',
|
||||
example: 'order',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:20|nullable')]
|
||||
public ?string $related_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'action_url',
|
||||
description: '操作跳转URL',
|
||||
type: 'string',
|
||||
example: '/system/notice/1',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $action_url = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'action_params',
|
||||
description: '操作参数(JSON字符串)',
|
||||
type: 'string',
|
||||
example: '{"id":1,"type":"detail"}',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|nullable')]
|
||||
public ?string $action_params = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'expired_at',
|
||||
description: '过期时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2023-12-31T23:59:59Z',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date_format:Y-m-d H:i:s|nullable')]
|
||||
public ?string $expired_at = null;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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\message;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '消息列表查询请求',
|
||||
description: '消息列表接口的查询过滤参数'
|
||||
)]
|
||||
class MessageQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '消息标题',
|
||||
type: 'string',
|
||||
example: '系统通知',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:100|nullable')]
|
||||
public ?string $title = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '消息内容',
|
||||
type: 'string',
|
||||
example: '系统升级',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $content = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '消息状态(0=未读,1=已读)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $status = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'priority',
|
||||
description: '优先级(1=低,2=中,3=高)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 3,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:1,2,3|nullable')]
|
||||
public ?int $priority = 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\notice;
|
||||
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '公告表单',
|
||||
description: '公告创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class NoticeFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '公告类型',
|
||||
type: 'string',
|
||||
enum: ['notice', 'announcement', 'alert'],
|
||||
example: 'notice',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|in:notice,announcement,alert')]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '公告标题',
|
||||
type: 'string',
|
||||
example: '系统升级通知',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '公告内容',
|
||||
type: 'string',
|
||||
example: '系统将于2025-10-20进行升级维护',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 10,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:0|max:1000')]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|in:0,1')]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: '重要公告',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $remark = null;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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\notice;
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '公告列表查询请求',
|
||||
description: '公告列表接口的查询过滤参数'
|
||||
)]
|
||||
class NoticeQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '公告标题',
|
||||
type: 'string',
|
||||
example: '系统公告',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:100|nullable')]
|
||||
public ?string $title = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '公告类型',
|
||||
type: 'string',
|
||||
enum: ['notice', 'announcement', 'alert'],
|
||||
example: 'notice',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|in:notice,announcement,alert|nullable')]
|
||||
public ?string $type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'integer|in:0,1|nullable')]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'start_date',
|
||||
description: '创建开始日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
example: '2025-10-01',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date|nullable')]
|
||||
public ?string $start_date = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'end_date',
|
||||
description: '创建结束日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
example: '2025-10-31',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date|after_or_equal:start_date|nullable')]
|
||||
public ?string $end_date = 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: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\request\org;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '部门表单',
|
||||
description: '部门创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class DeptFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '部门ID',
|
||||
type: 'string',
|
||||
example: '1',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string|int|null $id;
|
||||
|
||||
#[OA\Property(
|
||||
description: '父部门ID',
|
||||
type: 'string',
|
||||
example: '0',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $parent_id;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门名称',
|
||||
type: 'string',
|
||||
example: '开发部',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|unique:sys_dept,name,' . 'id' . ',id')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门编码',
|
||||
type: 'string',
|
||||
example: 'dev',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50|alpha_dash|unique:sys_dept,code,' . 'id' . ',id')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门领导ID列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'integer'),
|
||||
example: [1, 2],
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'array|nullable')]
|
||||
public ?array $leader_id_list = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '联系电话',
|
||||
type: 'string',
|
||||
example: '13800138000',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'phone|nullable')]
|
||||
public ?string $phone = null;
|
||||
|
||||
#[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: 'integer',
|
||||
example: 100,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:0|max:999')]
|
||||
public int $sort;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?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\org;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '部门列表查询请求',
|
||||
description: '部门列表接口的查询过滤参数'
|
||||
)]
|
||||
class DeptQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
description: '部门编码',
|
||||
type: 'string',
|
||||
example: 'dev',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $code = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门名称',
|
||||
type: 'string',
|
||||
example: '开发部',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:0,1|nullable')]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '排序字段',
|
||||
type: 'string',
|
||||
default: 'sort asc',
|
||||
example: 'sort asc'
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|nullable')]
|
||||
public ?string $order = null;
|
||||
|
||||
#[OA\Property(
|
||||
description: '返回数据格式(normal|tree|select)',
|
||||
type: 'string',
|
||||
default: 'normal',
|
||||
enum: ['normal', 'tree', 'select'],
|
||||
example: 'normal'
|
||||
)]
|
||||
#[ValidationRules(rules: 'in:normal,tree,select|nullable')]
|
||||
public ?string $format = 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\org;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '岗位表单',
|
||||
description: '岗位创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class PostFormRequest extends BaseFormRequest
|
||||
{
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dept_id',
|
||||
description: '部门ID',
|
||||
type: 'string',
|
||||
example: '246996721795072000',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string')]
|
||||
public string $dept_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '岗位编码',
|
||||
type: 'string',
|
||||
example: 'SDF',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:30|unique:sys_post,code')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '岗位名称',
|
||||
type: 'string',
|
||||
example: 'AD',
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|string|max:50')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 0,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|min:0|max:1000')]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: false
|
||||
)]
|
||||
#[ValidationRules(rules: 'required|integer|in:0,1')]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: 'ASDF',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:255|nullable')]
|
||||
public ?string $remark = null;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<?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\org;
|
||||
|
||||
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '岗位列表查询请求',
|
||||
description: '岗位列表接口的查询过滤参数'
|
||||
)]
|
||||
class PostQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '岗位名称',
|
||||
type: 'string',
|
||||
example: '技术主管',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:50|nullable')]
|
||||
public ?string $name = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '岗位编码',
|
||||
type: 'string',
|
||||
example: 'TECH_LEAD',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|max:30|nullable')]
|
||||
public ?string $code = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dept_id',
|
||||
description: '部门ID',
|
||||
type: 'string',
|
||||
example: '246996721795072000',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'string|nullable')]
|
||||
public ?string $dept_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'integer|in:0,1|nullable')]
|
||||
public ?int $enabled = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'start_date',
|
||||
description: '创建开始日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
example: '2025-11-01',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date|nullable')]
|
||||
public ?string $start_date = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'end_date',
|
||||
description: '创建结束日期',
|
||||
type: 'string',
|
||||
format: 'date',
|
||||
example: '2025-11-30',
|
||||
nullable: true
|
||||
)]
|
||||
#[ValidationRules(rules: 'date|after_or_equal:start_date|nullable')]
|
||||
public ?string $end_date = null;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\plugin;
|
||||
|
||||
use app\schema\request\BaseFormRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '应用授权表单',
|
||||
description: '应用授权创建和编辑接口共用的表单请求参数'
|
||||
)]
|
||||
class ApplicationAuthFormRequest extends BaseFormRequest
|
||||
{
|
||||
#[OA\Property(property: 'name', description: '应用名称', type: 'string', example: '开放平台应用', nullable: false)]
|
||||
#[ValidationRules(rules: 'required|string|max:100')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(property: 'expired_at', description: '失效时间戳', type: 'integer', example: 1795104000, nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|integer')]
|
||||
public ?int $expired_at = null;
|
||||
|
||||
#[OA\Property(property: 'enabled', description: '状态(1正常 0停用)', type: 'integer', enum: [0, 1], example: 1, nullable: false)]
|
||||
#[ValidationRules(rules: 'required|integer|in:0,1')]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(property: 'description', description: '描述', type: 'string', example: '用于第三方应用接口调用', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:500')]
|
||||
public ?string $description = null;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\plugin;
|
||||
|
||||
use app\schema\request\BaseQueryRequest;
|
||||
use OpenApi\Attributes as OA;
|
||||
use WebmanTech\DTO\Attributes\ValidationRules;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '应用授权查询',
|
||||
description: '应用授权列表查询请求参数'
|
||||
)]
|
||||
class ApplicationAuthQueryRequest extends BaseQueryRequest
|
||||
{
|
||||
#[OA\Property(property: 'LIKE_name', description: '应用名称', type: 'string', example: '开放平台', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:100')]
|
||||
public ?string $LIKE_name = null;
|
||||
|
||||
#[OA\Property(property: 'LIKE_access_key', description: 'Access Key', type: 'string', example: 'AK', nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|string|max:64')]
|
||||
public ?string $LIKE_access_key = null;
|
||||
|
||||
#[OA\Property(property: 'EQ_enabled', description: '状态', type: 'integer', enum: [0, 1], example: 1, nullable: true)]
|
||||
#[ValidationRules(rules: 'nullable|integer|in:0,1')]
|
||||
public ?int $EQ_enabled = null;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\profile;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '头像更新请求',
|
||||
description: '更新当前登录用户的头像'
|
||||
)]
|
||||
final class AvatarUpdateRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'avatar',
|
||||
description: '头像 URL 或 Base64 编码',
|
||||
type: 'string',
|
||||
example: '/upload/avatar.jpg'
|
||||
)]
|
||||
public string $avatar;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\profile;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '密码修改请求',
|
||||
description: '修改当前登录用户的密码'
|
||||
)]
|
||||
final class PasswordUpdateRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'old_password',
|
||||
description: '当前密码',
|
||||
type: 'string',
|
||||
minLength: 6,
|
||||
maxLength: 20,
|
||||
example: 'old123456'
|
||||
)]
|
||||
public string $old_password;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'new_password',
|
||||
description: '新密码',
|
||||
type: 'string',
|
||||
minLength: 6,
|
||||
maxLength: 20,
|
||||
example: 'new123456'
|
||||
)]
|
||||
public string $new_password;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'confirm_password',
|
||||
description: '确认新密码',
|
||||
type: 'string',
|
||||
minLength: 6,
|
||||
maxLength: 20,
|
||||
example: 'new123456'
|
||||
)]
|
||||
public string $confirm_password;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\request\profile;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '个人信息更新请求',
|
||||
description: '更新当前登录用户的个人信息'
|
||||
)]
|
||||
final class ProfileUpdateRequest
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'real_name',
|
||||
description: '真实姓名',
|
||||
type: 'string',
|
||||
minLength: 2,
|
||||
maxLength: 50,
|
||||
example: '张三'
|
||||
)]
|
||||
public string $real_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'nick_name',
|
||||
description: '昵称',
|
||||
type: 'string',
|
||||
minLength: 2,
|
||||
maxLength: 30,
|
||||
example: '小明'
|
||||
)]
|
||||
public string $nick_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'email',
|
||||
description: '邮箱',
|
||||
type: 'string',
|
||||
format: 'email',
|
||||
example: 'user@example.com'
|
||||
)]
|
||||
public string $email;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'mobile_phone',
|
||||
description: '手机号码',
|
||||
type: 'string',
|
||||
pattern: '^1[3-9]\\d{9}$',
|
||||
example: '13800138000'
|
||||
)]
|
||||
public string $mobile_phone;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sex',
|
||||
description: '性别:0=未知,1=男,2=女',
|
||||
type: 'integer',
|
||||
enum: [0, 1, 2],
|
||||
example: 1
|
||||
)]
|
||||
public int $sex;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'signed',
|
||||
description: '个人签名',
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
example: '专注于用户体验设计'
|
||||
)]
|
||||
public ?string $signed;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'address',
|
||||
description: '地址',
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
example: '北京市朝阳区'
|
||||
)]
|
||||
public ?string $address;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
<?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\response\crontab;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务信息',
|
||||
description: '系统定时任务数据结构'
|
||||
)]
|
||||
class CrontabLogResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '日志ID',
|
||||
type: 'string',
|
||||
example: '123456789012345678'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'crontab_id',
|
||||
description: '定时任务ID',
|
||||
type: 'integer',
|
||||
example: 1001
|
||||
)]
|
||||
public int $crontab_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'task_name',
|
||||
description: '任务名称',
|
||||
type: 'string',
|
||||
example: '数据备份任务'
|
||||
)]
|
||||
public string $task_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'exec_time',
|
||||
description: '执行时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2023-11-15 08:30:00'
|
||||
)]
|
||||
public string $exec_time;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '执行状态:0-失败 1-成功',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'output',
|
||||
description: '执行输出日志',
|
||||
type: 'string',
|
||||
example: '备份成功,文件大小:2048KB'
|
||||
)]
|
||||
public string $output;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'create_time',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2023-11-15 08:30:01'
|
||||
)]
|
||||
public string $create_time;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'update_time',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2023-11-15 08:30:01'
|
||||
)]
|
||||
public string $update_time;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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\response\crontab;
|
||||
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '定时任务信息',
|
||||
description: '系统定时任务数据结构'
|
||||
)]
|
||||
class CrontabResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '任务ID',
|
||||
type: 'string',
|
||||
example: '123456789012345678'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '任务名称',
|
||||
type: 'string',
|
||||
example: '数据备份任务'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '任务类型(1:系统任务 2:自定义任务)',
|
||||
type: 'integer',
|
||||
enum: [1, 2],
|
||||
example: 1
|
||||
)]
|
||||
public int $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'command',
|
||||
description: '执行命令/类方法',
|
||||
type: 'string',
|
||||
example: 'app\command\Backup::run'
|
||||
)]
|
||||
public string $command;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'expression',
|
||||
description: 'CRON表达式',
|
||||
type: 'string',
|
||||
example: '0 0 * * *'
|
||||
)]
|
||||
public string $expression;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '状态(1:运行中 0:已暂停)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-05-12T10:30:00Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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\response\gateway;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'RateLimiterSchema',
|
||||
title: "限访规则",
|
||||
description: "限访规则模型"
|
||||
)]
|
||||
class RateLimiterResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(property: "id", description: "主键ID", type: "string", example: "247298887944531968")]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(property: "name", description: "规则名称", type: "string", example: "customized")]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(property: "match_type", description: "匹配类型", type: "string", example: "allow")]
|
||||
public string $match_type;
|
||||
|
||||
#[OA\Property(property: "ip", description: "IP地址", type: "string", example: null, nullable: true)]
|
||||
public ?string $ip = null;
|
||||
|
||||
#[OA\Property(property: "priority", description: "优先级", type: "integer", example: 100)]
|
||||
public int $priority;
|
||||
|
||||
#[OA\Property(property: "methods", description: "请求方法", type: "string", example: "GET")]
|
||||
public string $methods;
|
||||
|
||||
#[OA\Property(property: "path", description: "请求路径", type: "string", example: "/system/menu")]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(property: "limit_type", description: "限制类型", type: "string", example: "count")]
|
||||
public string $limit_type;
|
||||
|
||||
#[OA\Property(property: "limit_value", description: "限制值", type: "integer", example: 60)]
|
||||
public int $limit_value;
|
||||
|
||||
#[OA\Property(
|
||||
property: "enabled",
|
||||
description: "是否启用(0:禁用,1:启用)",
|
||||
type: "integer",
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(property: "message", description: "提示消息", type: "string", example: "请求频繁")]
|
||||
public string $message;
|
||||
|
||||
#[OA\Property(property: "created_by", description: "创建人ID", type: "integer", example: 1)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(property: "updated_by", description: "更新人ID", type: "integer", example: null, nullable: true)]
|
||||
public ?int $updated_by = null;
|
||||
|
||||
#[OA\Property(property: "created_at", description: "创建时间(UTC)", type: "string", format: "date-time", example: "2025-11-13T01:57:29.000000Z")]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(property: "updated_at", description: "更新时间(UTC)", type: "string", format: "date-time", example: "2025-11-13T01:57:29.000000Z")]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(property: "created_date", description: "创建时间(本地)", type: "string", example: "2025-11-13 09:57:29")]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(property: "updated_date", description: "更新时间(本地)", type: "string", example: "2025-11-13 09:57:29")]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -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: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\gateway;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
schema: 'RateRestrictionsSchema',
|
||||
title: '限访名单',
|
||||
description: '限访名单数据模型'
|
||||
)]
|
||||
class RateRestrictionsResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(property: "id", description: "主键ID", type: "string", example: "247306532294254592")]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(property: "ip", description: "IP地址", type: "string", example: null, nullable: true)]
|
||||
public ?string $ip = null;
|
||||
|
||||
#[OA\Property(property: "name", description: "名单名称", type: "string", example: "sss")]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: "enabled",
|
||||
description: "是否启用(0:禁用,1:启用)",
|
||||
type: "integer",
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(property: "priority", description: "优先级", type: "integer", example: 100)]
|
||||
public int $priority;
|
||||
|
||||
#[OA\Property(property: "methods", description: "请求方法", type: "string", example: "GET")]
|
||||
public string $methods;
|
||||
|
||||
#[OA\Property(property: "path", description: "请求路径", type: "string", example: "/system/menu")]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(property: "message", description: "限制提示消息", type: "string", example: "限制访问")]
|
||||
public string $message;
|
||||
|
||||
#[OA\Property(property: "start_time", description: "生效开始时间", type: "string", format: "date-time", example: null, nullable: true)]
|
||||
public ?string $start_time = null;
|
||||
|
||||
#[OA\Property(property: "end_time", description: "生效结束时间", type: "string", format: "date-time", example: null, nullable: true)]
|
||||
public ?string $end_time = null;
|
||||
|
||||
#[OA\Property(property: "created_at", description: "创建时间(UTC)", type: "string", format: "date-time", example: "2025-11-13T02:27:52.000000Z")]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(property: "updated_at", description: "更新时间(UTC)", type: "string", format: "date-time", example: "2025-11-13T02:27:52.000000Z")]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(property: "created_by", description: "创建人ID", type: "integer", example: 1)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(property: "updated_by", description: "更新人ID", type: "integer", example: null, nullable: true)]
|
||||
public ?int $updated_by = null;
|
||||
|
||||
#[OA\Property(property: "remark", description: "备注信息", type: "string", example: null, nullable: true)]
|
||||
public ?string $remark = null;
|
||||
|
||||
#[OA\Property(property: "created_date", description: "创建时间(本地)", type: "string", example: "2025-11-13 10:27:52")]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(property: "updated_date", description: "更新时间(本地)", type: "string", example: "2025-11-13 10:27:52")]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(property: "start_date", type: "string", nullable: true, description: "生效开始日期(本地)", example: null)]
|
||||
public ?string $start_date = null;
|
||||
|
||||
#[OA\Property(property: "end_date", type: "string", nullable: true, description: "生效结束日期(本地)", example: null)]
|
||||
public ?string $end_date = null;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\member;
|
||||
|
||||
use app\schema\response\Result;
|
||||
use app\schema\response\ResultCode;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* 会员详情响应Schema
|
||||
*/
|
||||
#[OA\Schema(
|
||||
title: '会员详情响应模型',
|
||||
description: '会员详情接口的返回数据结构'
|
||||
)]
|
||||
class MemberDetailResponse extends Result
|
||||
{
|
||||
public function __construct(
|
||||
#[OA\Property(ref: 'ResultCode', title: '响应码')]
|
||||
ResultCode $code = ResultCode::SUCCESS,
|
||||
#[OA\Property(title: '响应消息', type: 'string', example: '获取成功')]
|
||||
?string $msg = null,
|
||||
#[OA\Property(
|
||||
title: '会员详情数据',
|
||||
ref: '#/components/schemas/MemberSchema'
|
||||
)]
|
||||
mixed $data = []
|
||||
) {
|
||||
parent::__construct($code, $msg, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\member;
|
||||
|
||||
use app\schema\response\Result;
|
||||
use app\schema\response\ResultCode;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* 会员列表响应Schema
|
||||
*/
|
||||
#[OA\Schema(
|
||||
title: '会员列表响应模型',
|
||||
description: '会员列表接口的返回数据结构'
|
||||
)]
|
||||
class MemberListResponse extends Result
|
||||
{
|
||||
public function __construct(
|
||||
#[OA\Property(ref: 'ResultCode', title: '响应码')]
|
||||
ResultCode $code = ResultCode::SUCCESS,
|
||||
#[OA\Property(title: '响应消息', type: 'string', example: '获取成功')]
|
||||
?string $msg = null,
|
||||
#[OA\Property(
|
||||
title: '响应数据',
|
||||
properties: [
|
||||
new OA\Property(
|
||||
property: 'list',
|
||||
description: '会员列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(ref: '#/components/schemas/MemberSchema')
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'total',
|
||||
description: '总记录数',
|
||||
type: 'integer',
|
||||
example: 100
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'page',
|
||||
description: '当前页码',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'limit',
|
||||
description: '每页数量',
|
||||
type: 'integer',
|
||||
example: 15
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'pages',
|
||||
description: '总页数',
|
||||
type: 'integer',
|
||||
example: 7
|
||||
),
|
||||
],
|
||||
type: 'object'
|
||||
)]
|
||||
mixed $data = []
|
||||
) {
|
||||
parent::__construct($code, $msg, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\member;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* 会员Schema
|
||||
*/
|
||||
#[OA\Schema(
|
||||
title: '会员模型',
|
||||
description: '会员实体数据结构'
|
||||
)]
|
||||
class MemberResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '会员ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'username',
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'testuser'
|
||||
)]
|
||||
public string $username;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'email',
|
||||
description: '邮箱',
|
||||
type: 'string',
|
||||
example: 'test@example.com'
|
||||
)]
|
||||
public ?string $email = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'phone',
|
||||
description: '手机号',
|
||||
type: 'string',
|
||||
example: '13800138000'
|
||||
)]
|
||||
public ?string $phone = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'nickname',
|
||||
description: '昵称',
|
||||
type: 'string',
|
||||
example: '测试用户'
|
||||
)]
|
||||
public ?string $nickname = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'avatar',
|
||||
description: '头像',
|
||||
type: 'string',
|
||||
example: '/uploads/avatar.jpg'
|
||||
)]
|
||||
public ?string $avatar = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'level_id',
|
||||
description: '等级ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $level_id = 1;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'points',
|
||||
description: '积分',
|
||||
type: 'integer',
|
||||
example: 100
|
||||
)]
|
||||
public int $points = 0;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'balance',
|
||||
description: '余额',
|
||||
type: 'number',
|
||||
format: 'float',
|
||||
example: 50.00
|
||||
)]
|
||||
public float $balance = 0.0;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'gender',
|
||||
description: '性别:0-未知 1-男 2-女',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $gender = 0;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'gender_text',
|
||||
description: '性别文本',
|
||||
type: 'string',
|
||||
example: '男'
|
||||
)]
|
||||
public string $gender_text;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'birthday',
|
||||
description: '生日',
|
||||
type: 'string',
|
||||
example: '1990-01-01'
|
||||
)]
|
||||
public ?string $birthday = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'last_login_time',
|
||||
description: '最后登录时间',
|
||||
type: 'string',
|
||||
example: '2024-01-01 10:00:00'
|
||||
)]
|
||||
public ?string $last_login_time = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'last_login_ip',
|
||||
description: '最后登录IP',
|
||||
type: 'string',
|
||||
example: '127.0.0.1'
|
||||
)]
|
||||
public ?string $last_login_ip = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'login_count',
|
||||
description: '登录次数',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $login_count = 0;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '状态:1-正常 0-禁用',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $status = 1;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status_text',
|
||||
description: '状态文本',
|
||||
type: 'string',
|
||||
example: '正常'
|
||||
)]
|
||||
public string $status_text;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
example: '2024-01-01 10:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
example: '2024-01-01 10:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\member;
|
||||
|
||||
use app\schema\response\Result;
|
||||
use app\schema\response\ResultCode;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
/**
|
||||
* 会员统计响应Schema
|
||||
*/
|
||||
#[OA\Schema(
|
||||
title: '会员统计响应模型',
|
||||
description: '会员统计接口的返回数据结构'
|
||||
)]
|
||||
class MemberStatisticsResponse extends Result
|
||||
{
|
||||
public function __construct(
|
||||
#[OA\Property(ref: 'ResultCode', title: '响应码')]
|
||||
ResultCode $code = ResultCode::SUCCESS,
|
||||
#[OA\Property(title: '响应消息', type: 'string', example: '获取成功')]
|
||||
?string $msg = null,
|
||||
#[OA\Property(
|
||||
title: '统计结果数据',
|
||||
properties: [
|
||||
new OA\Property(
|
||||
property: 'total',
|
||||
description: '总会员数',
|
||||
type: 'integer',
|
||||
example: 1000
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'today',
|
||||
description: '今日新增',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'enabled',
|
||||
description: '正常会员',
|
||||
type: 'integer',
|
||||
example: 950
|
||||
),
|
||||
new OA\Property(
|
||||
property: 'disabled',
|
||||
description: '禁用会员',
|
||||
type: 'integer',
|
||||
example: 50
|
||||
),
|
||||
],
|
||||
type: 'object'
|
||||
)]
|
||||
mixed $data = []
|
||||
) {
|
||||
parent::__construct($code, $msg, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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\response\monitor;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: 'Redis监控信息响应模型',
|
||||
description: 'Redis服务器监控接口的返回数据结构'
|
||||
)]
|
||||
class RedisMonitorResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'redis_version',
|
||||
description: 'Redis版本',
|
||||
type: 'string',
|
||||
example: '6.2.6'
|
||||
)]
|
||||
public string $redis_version;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'used_memory',
|
||||
description: '已使用内存(字节)',
|
||||
type: 'integer',
|
||||
example: 1048576
|
||||
)]
|
||||
public int $used_memory;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'used_memory_human',
|
||||
description: '人类可读已使用内存',
|
||||
type: 'string',
|
||||
example: '1.00M'
|
||||
)]
|
||||
public string $used_memory_human;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'connected_clients',
|
||||
description: '已连接客户端数',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $connected_clients;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'uptime_in_days',
|
||||
description: '运行天数',
|
||||
type: 'integer',
|
||||
example: 30
|
||||
)]
|
||||
public int $uptime_in_days;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'keyspace_hits',
|
||||
description: '键空间命中次数',
|
||||
type: 'integer',
|
||||
example: 10000
|
||||
)]
|
||||
public int $keyspace_hits;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'keyspace_misses',
|
||||
description: '键空间未命中次数',
|
||||
type: 'integer',
|
||||
example: 100
|
||||
)]
|
||||
public int $keyspace_misses;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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\response\monitor;
|
||||
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '服务器监控信息响应模型',
|
||||
description: '服务器CPU、内存、磁盘及PHP环境监控接口的返回数据结构'
|
||||
)]
|
||||
class ServerMonitorResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'cpu',
|
||||
description: 'CPU监控信息',
|
||||
properties: [
|
||||
new OA\Property(property: 'usage', description: 'CPU使用率(%)', type: 'number', format: 'float', example: 25.5),
|
||||
new OA\Property(property: 'cores', description: 'CPU核心数', type: 'integer', example: 8),
|
||||
new OA\Property(property: 'model', description: 'CPU型号', type: 'string', example: 'Intel(R) Core(TM) i7-8700K'),
|
||||
],
|
||||
type: 'object',
|
||||
)]
|
||||
public object $cpu;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'memory',
|
||||
description: '内存监控信息',
|
||||
properties: [
|
||||
new OA\Property(property: 'total', description: '总内存(MB)', type: 'integer', example: 16384),
|
||||
new OA\Property(property: 'used', description: '已使用内存(MB)', type: 'integer', example: 8192),
|
||||
new OA\Property(property: 'free', description: '空闲内存(MB)', type: 'integer', example: 8192),
|
||||
new OA\Property(property: 'usage', description: '内存使用率(%)', type: 'number', format: 'float', example: 50.0),
|
||||
],
|
||||
type: 'object',
|
||||
)]
|
||||
public object $memory;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'disk',
|
||||
description: '磁盘监控信息',
|
||||
properties: [
|
||||
new OA\Property(property: 'total', description: '总磁盘空间(GB)', type: 'integer', example: 512),
|
||||
new OA\Property(property: 'used', description: '已使用磁盘空间(GB)', type: 'integer', example: 256),
|
||||
new OA\Property(property: 'free', description: '空闲磁盘空间(GB)', type: 'integer', example: 256),
|
||||
new OA\Property(property: 'usage', description: '磁盘使用率(%)', type: 'number', format: 'float', example: 50.0),
|
||||
],
|
||||
type: 'object',
|
||||
)]
|
||||
public object $disk;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'php',
|
||||
description: 'PHP环境信息',
|
||||
properties: [
|
||||
new OA\Property(property: 'version', description: 'PHP版本', type: 'string', example: '7.4.33'),
|
||||
new OA\Property(property: 'max_execution_time', description: '最大执行时间(秒)', type: 'integer', example: 30),
|
||||
new OA\Property(property: 'memory_limit', description: '内存限制', type: 'string', example: '128M'),
|
||||
],
|
||||
type: 'object',
|
||||
)]
|
||||
public object $php;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\plugin;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '应用授权响应模型',
|
||||
description: '应用授权接口返回数据结构'
|
||||
)]
|
||||
class ApplicationAuthResponse
|
||||
{
|
||||
#[OA\Property(property: 'id', description: '主键', type: 'string', example: '234161405304516608')]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(property: 'name', description: '应用名称', type: 'string', example: '开放平台应用')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(property: 'access_key', description: 'Access Key', type: 'string', example: 'AK1234567890ABCDEF')]
|
||||
public string $access_key;
|
||||
|
||||
#[OA\Property(property: 'secret_key', description: 'Secret Key', type: 'string', example: 'SK1234567890ABCDEF')]
|
||||
public string $secret_key;
|
||||
|
||||
#[OA\Property(property: 'expired_at', description: '失效时间戳', type: 'integer', example: 1795104000, nullable: true)]
|
||||
public ?int $expired_at;
|
||||
|
||||
#[OA\Property(property: 'expired_date', description: '失效时间', type: 'string', example: '2026-11-20 00:00:00', nullable: true)]
|
||||
public ?string $expired_date;
|
||||
|
||||
#[OA\Property(property: 'enabled', description: '状态', type: 'integer', example: 1)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(property: 'description', description: '描述', type: 'string', example: '用于第三方应用接口调用', nullable: true)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(property: 'created_at', description: '创建时间戳', type: 'integer', example: 1795104000, nullable: true)]
|
||||
public ?int $created_at;
|
||||
|
||||
#[OA\Property(property: 'created_date', description: '创建时间', type: 'string', example: '2026-07-20 18:00:00', nullable: true)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(property: 'created_name', description: '创建人', type: 'string', example: '超级管理员', nullable: true)]
|
||||
public ?string $created_name;
|
||||
|
||||
#[OA\Property(property: 'updated_date', description: '更新时间', type: 'string', example: '2026-07-20 18:00:00', nullable: true)]
|
||||
public ?string $updated_date;
|
||||
|
||||
#[OA\Property(property: 'updated_name', description: '修改人', type: 'string', example: '超级管理员', nullable: true)]
|
||||
public ?string $updated_name;
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '管理员详情响应模型',
|
||||
description: '管理员详情接口的返回数据结构'
|
||||
)]
|
||||
class AdminResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '管理员ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'real_name',
|
||||
description: '真实姓名',
|
||||
type: 'string',
|
||||
example: '管理员'
|
||||
)]
|
||||
public string $real_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'mobile_phone',
|
||||
description: '手机号码',
|
||||
type: 'string',
|
||||
example: '18888888888'
|
||||
)]
|
||||
public string $mobile_phone;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'email',
|
||||
description: '邮箱',
|
||||
type: 'string',
|
||||
example: 'admin@example.com'
|
||||
)]
|
||||
public string $email;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
)]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dept_id',
|
||||
description: '部门ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $dept_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'avatar',
|
||||
description: '头像',
|
||||
type: 'string',
|
||||
example: '/upload/avatar.jpg'
|
||||
)]
|
||||
public string $avatar;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_super',
|
||||
description: '是否超级管理员(0:否,1:是)',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
enum: [0, 1]
|
||||
)]
|
||||
public int $is_super;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_tenant_admin',
|
||||
description: '是否租户管理员(0:否,1:是)',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
enum: [0, 1]
|
||||
)]
|
||||
public int $is_tenant_admin;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T16:28:51+08:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T16:28:51+08:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置分组响应模型',
|
||||
description: '配置分组接口的返回数据结构'
|
||||
)]
|
||||
class ConfigGroupResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '分组名称',
|
||||
type: 'string',
|
||||
example: '网站配置'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '分组描述',
|
||||
type: 'string',
|
||||
example: '网站相关配置项',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'config_count',
|
||||
description: '配置项数量',
|
||||
type: 'integer',
|
||||
example: 5
|
||||
)]
|
||||
public int $config_count;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置详情响应模型',
|
||||
description: '配置详情接口的返回数据结构'
|
||||
)]
|
||||
class ConfigResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '配置ID',
|
||||
type: 'string',
|
||||
example: '242218273104986112'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'group_code',
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site'
|
||||
)]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '配置编码',
|
||||
type: 'string',
|
||||
example: 'site_name'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '配置名称',
|
||||
type: 'string',
|
||||
example: '网站名称'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '配置内容',
|
||||
type: 'mixed',
|
||||
example: '我的网站'
|
||||
)]
|
||||
public mixed $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '配置描述',
|
||||
type: 'string',
|
||||
example: '网站名称配置项',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置值响应模型',
|
||||
description: '配置值操作接口的返回数据结构'
|
||||
)]
|
||||
class ConfigValueResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '配置编码',
|
||||
type: 'string',
|
||||
example: 'site_name'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'group_code',
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site'
|
||||
)]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '配置名称',
|
||||
type: 'string',
|
||||
example: '网站名称'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'value',
|
||||
description: '配置值',
|
||||
type: 'mixed',
|
||||
example: '我的网站'
|
||||
)]
|
||||
public mixed $value;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '配置描述',
|
||||
type: 'string',
|
||||
example: '网站名称配置项',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data_type',
|
||||
description: '数据类型(1:字符串 2:数字 3:布尔 4:数组 5:对象)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3, 4, 5],
|
||||
example: 1
|
||||
)]
|
||||
public int $data_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '部门详情响应模型',
|
||||
description: '部门详情接口的返回数据结构'
|
||||
)]
|
||||
class DeptResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(description: '部门ID', type: 'string', example: '246964377436553216')]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(description: '父部门ID', type: 'string', example: null, nullable: true)]
|
||||
public ?string $pid = null;
|
||||
|
||||
#[OA\Property(description: '部门层级', type: 'integer', example: null, nullable: true)]
|
||||
public ?int $level = null;
|
||||
|
||||
#[OA\Property(description: '部门编码', type: 'string', example: 'dev')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(description: '部门名称', type: 'string', example: '测试')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(description: '主要负责人ID', type: 'string', example: null, nullable: true)]
|
||||
public ?string $main_leader_id = null;
|
||||
|
||||
#[OA\Property(description: '联系电话', type: 'string', example: null, nullable: true)]
|
||||
public ?string $phone = null;
|
||||
|
||||
#[OA\Property(description: '状态(1:启用,0:禁用)', type: 'integer', enum: [0, 1], example: 1)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(description: '排序号', type: 'integer', example: 1)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(description: '创建人ID', type: 'integer', example: 1)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(description: '更新人ID', type: 'integer', example: null, nullable: true)]
|
||||
public int|string|null $updated_by = null;
|
||||
|
||||
#[OA\Property(description: '创建时间', type: 'string', format: 'date-time', example: '2025-11-12T03:48:15.000000Z')]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(description: '更新时间', type: 'string', format: 'date-time', example: '2025-11-12T03:48:15.000000Z')]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(description: '删除时间', type: 'string', format: 'date-time', example: null, nullable: true)]
|
||||
public ?string $deleted_at = null;
|
||||
|
||||
#[OA\Property(description: '备注', type: 'string', example: 'sdf', nullable: true)]
|
||||
public ?string $remark = null;
|
||||
|
||||
#[OA\Property(description: '创建时间(格式化)', type: 'string', example: '2025-11-12 11:48:15')]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(description: '更新时间(格式化)', type: 'string', example: '2025-11-12 11:48:15')]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门领导列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(ref: AdminResponse::class)
|
||||
)]
|
||||
public array $leader;
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典项详情响应模型',
|
||||
description: '字典项详情接口的返回数据结构'
|
||||
)]
|
||||
class DictItemResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '字典项ID',
|
||||
type: 'string', // 调整为字符串类型(匹配JSON中的长ID)
|
||||
example: '242218273109180416'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dict_id',
|
||||
description: '字典ID(关联主表)',
|
||||
type: 'string', // 调整为字符串类型
|
||||
example: '242218273104986112'
|
||||
)]
|
||||
public string $dict_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'label',
|
||||
description: '显示标签',
|
||||
type: 'string',
|
||||
example: '默认分组'
|
||||
)]
|
||||
public string $label;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'value',
|
||||
description: '选项值',
|
||||
type: 'string',
|
||||
example: 'value1'
|
||||
)]
|
||||
public string $value;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '字典项编码',
|
||||
type: 'string',
|
||||
example: 'default'
|
||||
)]
|
||||
public string $code; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'color',
|
||||
description: '颜色(如#4CAF50)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $color;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'other_class',
|
||||
description: '额外样式类',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $other_class; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1 // 原status字段重命名为enabled
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $created_by; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $updated_by; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_at; // 调整为可空
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_at; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date; // 新增字段
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* 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\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典详情响应模型',
|
||||
description: '字典详情接口的返回数据结构'
|
||||
)]
|
||||
class DictResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '字典ID',
|
||||
type: 'string', // 调整为字符串类型(匹配JSON中的长ID)
|
||||
example: '242218273104986112'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'group_code',
|
||||
description: '字典分组编码',
|
||||
type: 'string',
|
||||
example: 'default'
|
||||
)]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '字典名称',
|
||||
type: 'string',
|
||||
example: '所属分组' // 原 dict_name 重命名为 name
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '字典编码(唯一)',
|
||||
type: 'string',
|
||||
example: 'sys_dict_group_code' // 原 dict_type 重命名为 code
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data_type',
|
||||
description: '数据类型(1:字符串 2:数字 3:布尔)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 1
|
||||
)]
|
||||
public int $data_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '字典描述',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true // 原 remark 重命名为 description
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'string',
|
||||
example: 1
|
||||
)]
|
||||
public int|string $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'string',
|
||||
example: 1
|
||||
)]
|
||||
public int|string $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间(原始)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间(原始)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(title: '问题反馈响应')]
|
||||
class FeedbackResponse
|
||||
{
|
||||
#[OA\Property(property: 'id', description: '反馈ID', type: 'string', example: '234161405304516608')]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(property: 'type', description: '反馈类型', type: 'string', enum: ['bug', 'suggestion', 'correction'])]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(property: 'content', description: '问题描述', type: 'string')]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(property: 'contact', description: '联系方式', type: 'string', nullable: true)]
|
||||
public ?string $contact;
|
||||
|
||||
#[OA\Property(property: 'images', description: '截图附件地址数组', type: 'array', items: new OA\Items(type: 'string'), nullable: true)]
|
||||
public ?array $images;
|
||||
|
||||
#[OA\Property(property: 'source', description: '反馈来源', type: 'string', enum: ['app', 'web'])]
|
||||
public string $source;
|
||||
|
||||
#[OA\Property(property: 'reply_content', description: '管理员回复内容', type: 'string', nullable: true)]
|
||||
public ?string $reply_content;
|
||||
|
||||
#[OA\Property(property: 'reply_name', description: '回复管理员名称', type: 'string', nullable: true, example: '管理员')]
|
||||
public ?string $reply_name;
|
||||
|
||||
#[OA\Property(property: 'reply_date', description: '回复时间', type: 'string', nullable: true, example: '2026-08-26 15:30:00')]
|
||||
public ?string $reply_date;
|
||||
|
||||
#[OA\Property(property: 'created_name', description: '提交人名称,匿名提交显示匿名用户', type: 'string', example: '张三')]
|
||||
public string $created_name;
|
||||
|
||||
#[OA\Property(property: 'created_date', description: '提交时间', type: 'string', example: '2026-08-24 15:30:00')]
|
||||
public string $created_date;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '登录日志详情响应模型',
|
||||
description: '登录日志详情接口的返回数据结构'
|
||||
)]
|
||||
class LoginLogResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '日志ID',
|
||||
type: 'string',
|
||||
example: '244861012925743104'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '登录IP',
|
||||
type: 'string',
|
||||
example: '127.0.0.1'
|
||||
)]
|
||||
public string $ip;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip_location',
|
||||
description: 'IP归属地',
|
||||
type: 'string',
|
||||
example: '未知'
|
||||
)]
|
||||
public ?string $ip_location;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'os',
|
||||
description: '操作系统',
|
||||
type: 'string',
|
||||
example: 'Windows'
|
||||
)]
|
||||
public ?string $os;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'browser',
|
||||
description: '浏览器',
|
||||
type: 'string',
|
||||
example: 'Chrome'
|
||||
)]
|
||||
public ?string $browser;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '登录状态(1成功 0失败)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'message',
|
||||
description: '登录提示信息',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $message;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'login_time',
|
||||
description: '登录时间戳',
|
||||
type: 'integer',
|
||||
example: 1762417814
|
||||
)]
|
||||
public int $login_time;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'key',
|
||||
description: '登录会话密钥',
|
||||
type: 'string',
|
||||
example: '0c7792fa9477cd736f1cf2c27bbfff61'
|
||||
)]
|
||||
public string $key;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'expires_at',
|
||||
description: '会话过期时间戳',
|
||||
type: 'integer',
|
||||
example: 1762425014
|
||||
)]
|
||||
public int $expires_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-06T08:30:14.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-06T08:30:14.000000Z'
|
||||
)]
|
||||
public string $updated_at; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(本地)',
|
||||
type: 'string',
|
||||
example: '2025-11-06 16:30:14'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(本地)',
|
||||
type: 'string',
|
||||
example: '2025-11-06 16:30:14'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '系统菜单详情响应模型',
|
||||
description: '系统菜单详情接口的返回数据结构'
|
||||
)]
|
||||
class MenuResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '菜单ID',
|
||||
type: 'string',
|
||||
example: '242218273029488640'
|
||||
)]
|
||||
public string|int $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'pid',
|
||||
description: '父菜单ID(0为顶级菜单)',
|
||||
type: 'string',
|
||||
example: 0
|
||||
)]
|
||||
public int|string $pid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'app',
|
||||
description: '所属应用',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $app;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '菜单标题',
|
||||
type: 'string',
|
||||
example: '首页'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '菜单编码',
|
||||
type: 'string',
|
||||
example: 'Dashboard'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'level',
|
||||
description: '菜单层级',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $level;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '菜单类型(1菜单 2按钮 3接口)',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号(越小越靠前)',
|
||||
type: 'integer',
|
||||
example: -1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '路由路径',
|
||||
type: 'string',
|
||||
example: '/'
|
||||
)]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'component',
|
||||
description: '前端组件路径',
|
||||
type: 'string',
|
||||
example: 'BasicLayout'
|
||||
)]
|
||||
public string $component;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'redirect',
|
||||
description: '路由重定向',
|
||||
type: 'string',
|
||||
example: '/workspace',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $redirect;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'icon',
|
||||
description: '菜单图标(Ant Design图标)',
|
||||
type: 'string',
|
||||
example: 'ant-design:home-outlined'
|
||||
)]
|
||||
public string $icon;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_show',
|
||||
description: '是否显示(1显示 0隐藏)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $is_show;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_link',
|
||||
description: '是否外链(1是 0否)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_link;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'link_url',
|
||||
description: '外链地址',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $link_url;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'open_type',
|
||||
description: '打开方式(0当前页 1新窗口)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $open_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_cache',
|
||||
description: '是否缓存(1缓存 0不缓存)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_cache;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_sync',
|
||||
description: '是否同步路由(1同步 0不同步)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $is_sync;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_affix',
|
||||
description: '是否固定(1固定 0不固定)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_affix;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_global',
|
||||
description: '是否全局菜单(1是 0否)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_global;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'variable',
|
||||
description: '自定义变量',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $variable;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'methods',
|
||||
description: '请求方法(多个用逗号分隔)',
|
||||
type: 'string',
|
||||
example: 'get'
|
||||
)]
|
||||
public string $methods;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_frame',
|
||||
description: '是否内嵌窗口',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $is_frame;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'children',
|
||||
description: '子菜单列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(ref: MenuResponse::class),
|
||||
nullable: true
|
||||
)]
|
||||
public ?array $children; // 嵌套子菜单
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
<?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\response\system;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '消息详情响应模型',
|
||||
description: '消息详情接口的返回数据结构'
|
||||
)]
|
||||
class MessageResponse
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '消息ID(雪花ID)',
|
||||
type: 'string',
|
||||
example: '245329792713883648'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '消息类型',
|
||||
type: 'string',
|
||||
enum: ['message', 'notification', 'broadcast'],
|
||||
example: 'message'
|
||||
)]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '消息标题',
|
||||
type: 'string',
|
||||
example: '111111111111111'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '消息内容',
|
||||
type: 'string',
|
||||
example: '222222222222222222222'
|
||||
)]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sender_id',
|
||||
description: '发送者ID(0表示系统)',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $sender_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'receiver_id',
|
||||
description: '接收者ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $receiver_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '阅读状态',
|
||||
type: 'string',
|
||||
enum: ['read', 'unread'],
|
||||
example: 'read'
|
||||
)]
|
||||
public string $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'priority',
|
||||
description: '优先级(1普通 2重要 3紧急)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 1
|
||||
)]
|
||||
public int $priority;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'channel',
|
||||
description: '推送渠道',
|
||||
type: 'string',
|
||||
example: 'backend-admin-1-*'
|
||||
)]
|
||||
public string $channel;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'related_id',
|
||||
description: '关联业务ID',
|
||||
type: 'string',
|
||||
example: '234161405304516608',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $related_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'related_type',
|
||||
description: '关联业务类型',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $related_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'jump_params',
|
||||
description: '跳转参数',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?array $jump_params;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'message_uuid',
|
||||
description: '消息唯一标识',
|
||||
type: 'string',
|
||||
example: 'a6a0ff4f-81dc-c033-083e-99611865251c'
|
||||
)]
|
||||
public string $message_uuid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-07T15:33:00.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'expired_at',
|
||||
description: '过期时间戳',
|
||||
type: 'integer',
|
||||
example: 152336572961580
|
||||
)]
|
||||
public int $expired_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'read_at',
|
||||
description: '阅读时间戳',
|
||||
type: 'integer',
|
||||
example: 1762610591,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $read_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-08T14:03:11.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-07 23:33:00'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-08 22:03:11'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'read_date',
|
||||
description: '阅读时间(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-08 22:03:11',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $read_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sender',
|
||||
description: '发送者信息',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?array $sender;
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '系统公告详情响应模型',
|
||||
description: '系统公告详情接口的返回数据结构'
|
||||
)]
|
||||
class NoticeResponse
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '公告ID',
|
||||
type: 'string',
|
||||
example: '234161405304516608'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '公告类型',
|
||||
type: 'string',
|
||||
enum: ['notice', 'announcement', 'alert'],
|
||||
example: 'notice'
|
||||
)]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '公告标题',
|
||||
type: 'string',
|
||||
example: '111111111111111'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '公告内容',
|
||||
type: 'string',
|
||||
example: '222222222222222222222'
|
||||
)]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'uuid',
|
||||
description: '唯一标识',
|
||||
type: 'string',
|
||||
example: 'a6a0ff4f-81dc-c033-083e-99611865251c'
|
||||
)]
|
||||
public string $uuid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_dept',
|
||||
description: '创建部门',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_dept;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-07T19:53:49.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-21T13:43:42.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-08 03:53:49'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-21 21:43:42'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '操作日志详情响应模型',
|
||||
description: '操作日志详情接口的返回数据结构'
|
||||
)]
|
||||
class OperateLogResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '日志ID',
|
||||
type: 'string',
|
||||
example: '233375369209069568'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '操作名称',
|
||||
type: 'string',
|
||||
example: '数据字典'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'app',
|
||||
description: '应用名称',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $app;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '操作IP',
|
||||
type: 'string',
|
||||
example: '220.165.172.45'
|
||||
)]
|
||||
public string $ip;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip_location',
|
||||
description: 'IP归属地',
|
||||
type: 'string',
|
||||
example: '未知'
|
||||
)]
|
||||
public ?string $ip_location;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'browser',
|
||||
description: '浏览器',
|
||||
type: 'string',
|
||||
example: 'Chrome'
|
||||
)]
|
||||
public ?string $browser;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'os',
|
||||
description: '操作系统',
|
||||
type: 'string',
|
||||
example: 'Windows'
|
||||
)]
|
||||
public ?string $os;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'url',
|
||||
description: '请求URL',
|
||||
type: 'string',
|
||||
example: '/system/dict'
|
||||
)]
|
||||
public string $url;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'class_name',
|
||||
description: '控制器类名',
|
||||
type: 'string',
|
||||
example: 'app\\admin\\controller\\system\\SysDictController'
|
||||
)]
|
||||
public string $class_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'action',
|
||||
description: '操作方法',
|
||||
type: 'string',
|
||||
example: 'index'
|
||||
)]
|
||||
public string $action;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'method',
|
||||
description: '请求方法',
|
||||
type: 'string',
|
||||
enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
|
||||
example: 'GET'
|
||||
)]
|
||||
public string $method;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'param',
|
||||
description: '请求参数',
|
||||
type: 'object',
|
||||
example: '{"page":"1","limit":"20"}'
|
||||
)]
|
||||
public array $param;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '操作用户',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '操作时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-05T15:50:23.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-05T15:50:23.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '操作日期(本地)',
|
||||
type: 'string',
|
||||
example: '2025-10-05 23:50:23'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(本地)',
|
||||
type: 'string',
|
||||
example: '2025-10-05 23:50:23'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '岗位详情响应模型',
|
||||
description: '岗位详情接口的返回数据结构'
|
||||
)]
|
||||
class PostResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '岗位ID',
|
||||
type: 'string',
|
||||
example: '247048545520582656'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dept_id',
|
||||
description: '部门ID',
|
||||
type: 'string',
|
||||
example: '246996721795072000'
|
||||
)]
|
||||
public string $dept_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '岗位编码',
|
||||
type: 'string',
|
||||
example: 'SDF'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '岗位名称',
|
||||
type: 'string',
|
||||
example: 'AD'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-12T09:22:43.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-12T09:22:43.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: 'ASDF',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-12 17:22:43'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-12 17:22:43'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '回收站记录详情响应模型',
|
||||
description: '回收站记录详情接口的返回数据结构'
|
||||
)]
|
||||
class RecycleBinResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: 'ID',
|
||||
type: 'string',
|
||||
example: '123456789012345678'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'original_id',
|
||||
description: '原始数据ID',
|
||||
type: 'string',
|
||||
example: '232593675996626944'
|
||||
)]
|
||||
public string $original_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data',
|
||||
description: '回收数据',
|
||||
type: 'object',
|
||||
example: ['id' => 100, 'name' => '测试数据']
|
||||
)]
|
||||
public array $data;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'table_name',
|
||||
description: '数据表名',
|
||||
type: 'string',
|
||||
example: 'sys_upload'
|
||||
)]
|
||||
public string $table_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'table_prefix',
|
||||
description: '数据表前缀',
|
||||
type: 'string',
|
||||
example: 'ma_'
|
||||
)]
|
||||
public string $table_prefix;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否已还原(0=未还原,1=已还原)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '操作IP',
|
||||
type: 'string',
|
||||
example: '223.152.76.8'
|
||||
)]
|
||||
public string $ip;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'operate_by',
|
||||
description: '操作人ID',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $operate_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-03T12:14:38.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-03T12:14:38.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-03 20:14:38'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-03 20:14:38'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'operate_name',
|
||||
description: '操作人名称',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $operate_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'operate',
|
||||
description: '操作类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $operate;
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '角色详情响应模型',
|
||||
description: '角色详情接口的返回数据结构'
|
||||
)]
|
||||
class RoleResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '角色ID',
|
||||
type: 'string',
|
||||
example: '239312652730916864'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'pid',
|
||||
description: '父角色ID',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $pid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '角色名称',
|
||||
type: 'string',
|
||||
example: '测试'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '角色编码',
|
||||
type: 'string',
|
||||
example: 'dev'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_super_admin',
|
||||
description: '是否超级管理员(0=否,1=是)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_super_admin;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'role_type',
|
||||
description: '角色类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $role_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data_scope',
|
||||
description: '数据范围(1:全部数据 2:自定义 3:本部门 4:本部门及以下 5:本人)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3, 4, 5],
|
||||
example: 1
|
||||
)]
|
||||
public int $data_scope;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1:启用 0:禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-22T01:03:02.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-22T01:03:02.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-22 09:03:02'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-22 09:03:02'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'casbin',
|
||||
description: '角色权限列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'string', example: '239312654937120768'),
|
||||
new OA\Property(property: 'ptype', type: 'string', example: 'p'),
|
||||
new OA\Property(property: 'v0', type: 'string', example: 'role:239312652730916864'),
|
||||
new OA\Property(property: 'v1', type: 'string', example: 'domain:1'),
|
||||
new OA\Property(property: 'v2', type: 'string', example: 'menu:/'),
|
||||
new OA\Property(property: 'v3', type: 'string', example: '*'),
|
||||
new OA\Property(property: 'v4', type: 'string', example: 'get'),
|
||||
new OA\Property(property: 'v5', type: 'string', example: 'menu:232462703808479232'),
|
||||
new OA\Property(
|
||||
property: 'pivot',
|
||||
properties: [
|
||||
new OA\Property(property: 'role_id', type: 'string', example: '239312652730916864'),
|
||||
new OA\Property(property: 'role_casbin_id', type: 'string', example: 'role:239312652730916864')
|
||||
],
|
||||
type: 'object'
|
||||
)
|
||||
],
|
||||
type: 'object'
|
||||
)
|
||||
)]
|
||||
public array $casbin;
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '文件上传响应模型',
|
||||
description: '文件上传/下载接口的返回数据结构'
|
||||
)]
|
||||
class UploadResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '文件ID',
|
||||
type: 'string',
|
||||
example: '234982712740941824'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'url',
|
||||
description: '访问URL',
|
||||
type: 'string',
|
||||
example: 'http://43.138.153.216:8899/upload/42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $url;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'size',
|
||||
description: '文件大小(字节)',
|
||||
type: 'integer',
|
||||
example: 6308
|
||||
)]
|
||||
public int $size;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'size_info',
|
||||
description: '文件大小格式化显示',
|
||||
type: 'string',
|
||||
example: '6.16 KB'
|
||||
)]
|
||||
public string $size_info;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'hash',
|
||||
description: '文件哈希值',
|
||||
type: 'string',
|
||||
example: '42f86b9b36794fb9e380917c251f6d81'
|
||||
)]
|
||||
public string $hash;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'filename',
|
||||
description: '存储文件名',
|
||||
type: 'string',
|
||||
example: '42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $filename;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'original_filename',
|
||||
description: '原始文件名',
|
||||
type: 'string',
|
||||
example: 'logo.png'
|
||||
)]
|
||||
public string $original_filename;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'base_path',
|
||||
description: '基础存储路径',
|
||||
type: 'string',
|
||||
example: '/upload/42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $base_path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '服务器存储路径',
|
||||
type: 'string',
|
||||
example: '/www/wwwroot/playground/madong-admin-saas/server/public/upload/42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ext',
|
||||
description: '文件扩展名',
|
||||
type: 'string',
|
||||
example: 'png'
|
||||
)]
|
||||
public string $ext;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content_type',
|
||||
description: '文件MIME类型',
|
||||
type: 'string',
|
||||
example: 'image/png'
|
||||
)]
|
||||
public string $content_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'platform',
|
||||
description: '存储平台',
|
||||
type: 'string',
|
||||
example: 'local'
|
||||
)]
|
||||
public string $platform;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_url',
|
||||
description: '缩略图URL',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_url = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_filename',
|
||||
description: '缩略图文件名',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_filename = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_size',
|
||||
description: '缩略图大小(字节)',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $th_size = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_size_info',
|
||||
description: '缩略图大小格式化显示',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_size_info = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_content_type',
|
||||
description: '缩略图MIME类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_content_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'object_id',
|
||||
description: '关联对象ID',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $object_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'object_type',
|
||||
description: '关联对象类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $object_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'attr',
|
||||
description: '额外属性',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?object $attr = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '上传时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T02:17:24.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T02:17:24.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期',
|
||||
type: 'string',
|
||||
example: '2025-10-10 10:17:24'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期',
|
||||
type: 'string',
|
||||
example: '2025-10-10 10:17:24'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'createds',
|
||||
description: '创建人详情',
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'string', example: '2'),
|
||||
new OA\Property(property: 'created_name', type: 'string', example: '超级管理员'),
|
||||
new OA\Property(property: 'created_date', type: 'string', nullable: true, example: null),
|
||||
new OA\Property(property: 'updated_date', type: 'string', nullable: true, example: null)
|
||||
],
|
||||
type: 'object'
|
||||
)]
|
||||
public object $createds;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updateds',
|
||||
description: '更新人详情',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?object $updateds = null;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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\response\system\menu;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '菜单元信息【Art】',
|
||||
description: 'Madong-Art-Ui菜单的元信息(排序、标题、图标、权限等)'
|
||||
)]
|
||||
class ArtMenuMetaResponse
|
||||
{
|
||||
public function __construct(
|
||||
#[OA\Property(
|
||||
description: '排序序号(用于菜单排序)',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $order,
|
||||
|
||||
#[OA\Property(
|
||||
description: '菜单标题(显示名称)',
|
||||
type: 'string',
|
||||
example: '系统设置'
|
||||
)]
|
||||
public string $title,
|
||||
|
||||
#[OA\Property(
|
||||
description: '菜单图标(支持图标库类名或 Unicode)',
|
||||
type: 'string',
|
||||
example: 'ant-design:setting-outlined'
|
||||
)]
|
||||
public string $icon,
|
||||
|
||||
#[OA\Property(
|
||||
description: '访问角色列表(为空表示无角色限制)',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'string'),
|
||||
example: ["R_SUPER", "R_ADMIN"]
|
||||
)]
|
||||
public ?array $roles = null,
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否缓存组件(true=缓存,false=不缓存)',
|
||||
type: 'boolean',
|
||||
example: true
|
||||
)]
|
||||
public ?bool $keepAlive = null,
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否固定标签页(true=固定,false=不固定)',
|
||||
type: 'boolean',
|
||||
example: false
|
||||
)]
|
||||
public ?bool $fixedTab = null,
|
||||
|
||||
#[OA\Property(
|
||||
description: '权限列表(用于细粒度权限控制)',
|
||||
type: 'array',
|
||||
items: new OA\Items(
|
||||
type: 'object',
|
||||
properties: [
|
||||
new OA\Property(property: 'title', type: 'string',example: '超级管理员'),
|
||||
new OA\Property(property: 'authMark', type: 'string', example: 'admin')
|
||||
]
|
||||
),
|
||||
example: [
|
||||
['title' => '超级管理员', 'authMark' => 'admin']
|
||||
]
|
||||
)]
|
||||
public ?array $authList = null
|
||||
) {}
|
||||
}
|
||||
@@ -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: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system\menu;
|
||||
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '菜单结构响应模型【Art】',
|
||||
description: 'Madong-Art-Ui系统菜单数据结构'
|
||||
)]
|
||||
class ArtMenuResponse
|
||||
{
|
||||
/**
|
||||
* @var ArtMenuResponse[] 子菜单列表(同步更新子菜单类型)
|
||||
*/
|
||||
#[OA\Property(description: '子菜单', type: 'array', items: new OA\Items(ref: '#/components/schemas/ArtMenuSchema'))]
|
||||
public array $children = [];
|
||||
|
||||
public function __construct(
|
||||
#[OA\Property(description: '菜单名称', type: 'string')]
|
||||
public string $name,
|
||||
|
||||
#[OA\Property(description: '路由路径', type: 'string')]
|
||||
public string $path,
|
||||
|
||||
#[OA\Property(description: '组件路径', type: 'string')]
|
||||
public string|null $components,
|
||||
|
||||
// 关联元数据 schema(同步修改为 MenuMetaSchema)
|
||||
#[OA\Property( ref: ArtMenuMetaResponse::class,description: '元数据')]
|
||||
public ArtMenuMetaResponse $meta,
|
||||
|
||||
?array $children
|
||||
) {
|
||||
if ($children !== null) {
|
||||
// 递归转换子菜单为 ArtMenuSchema 对象
|
||||
$this->children = array_map(
|
||||
fn(array $child) => new self(
|
||||
$child['name'],
|
||||
$child['path'],
|
||||
$child['component'] ?? null,
|
||||
new ArtMenuMetaResponse(
|
||||
order: $child['meta']['order']??0,
|
||||
title: $child['meta']['title']??'',
|
||||
icon: $child['meta']['icon']??'',
|
||||
roles: $child['meta']['roles'] ?? null,
|
||||
keepAlive: $child['meta']['keepAlive'] ?? null,
|
||||
fixedTab: $child['meta']['fixedTab'] ?? null,
|
||||
authList: $child['meta']['authList'] ?? null
|
||||
),
|
||||
$child['children'] ?? null
|
||||
),
|
||||
$children
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user