初始化本地仓库

This commit is contained in:
2026-08-31 11:33:59 +08:00
commit 663f74b633
2390 changed files with 402918 additions and 0 deletions
@@ -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
);
}
}
}