初始化本地仓库

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,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;
}