初始化本地仓库
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '管理员详情响应模型',
|
||||
description: '管理员详情接口的返回数据结构'
|
||||
)]
|
||||
class AdminResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '管理员ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'real_name',
|
||||
description: '真实姓名',
|
||||
type: 'string',
|
||||
example: '管理员'
|
||||
)]
|
||||
public string $real_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'mobile_phone',
|
||||
description: '手机号码',
|
||||
type: 'string',
|
||||
example: '18888888888'
|
||||
)]
|
||||
public string $mobile_phone;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'email',
|
||||
description: '邮箱',
|
||||
type: 'string',
|
||||
example: 'admin@example.com'
|
||||
)]
|
||||
public string $email;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '状态(0:禁用,1:启用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1,
|
||||
)]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dept_id',
|
||||
description: '部门ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $dept_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'avatar',
|
||||
description: '头像',
|
||||
type: 'string',
|
||||
example: '/upload/avatar.jpg'
|
||||
)]
|
||||
public string $avatar;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_super',
|
||||
description: '是否超级管理员(0:否,1:是)',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
enum: [0, 1]
|
||||
)]
|
||||
public int $is_super;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_tenant_admin',
|
||||
description: '是否租户管理员(0:否,1:是)',
|
||||
type: 'integer',
|
||||
example: 1,
|
||||
enum: [0, 1]
|
||||
)]
|
||||
public int $is_tenant_admin;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T16:28:51+08:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T16:28:51+08:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置分组响应模型',
|
||||
description: '配置分组接口的返回数据结构'
|
||||
)]
|
||||
class ConfigGroupResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '分组名称',
|
||||
type: 'string',
|
||||
example: '网站配置'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '分组描述',
|
||||
type: 'string',
|
||||
example: '网站相关配置项',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'config_count',
|
||||
description: '配置项数量',
|
||||
type: 'integer',
|
||||
example: 5
|
||||
)]
|
||||
public int $config_count;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置详情响应模型',
|
||||
description: '配置详情接口的返回数据结构'
|
||||
)]
|
||||
class ConfigResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '配置ID',
|
||||
type: 'string',
|
||||
example: '242218273104986112'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'group_code',
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site'
|
||||
)]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '配置编码',
|
||||
type: 'string',
|
||||
example: 'site_name'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '配置名称',
|
||||
type: 'string',
|
||||
example: '网站名称'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '配置内容',
|
||||
type: 'mixed',
|
||||
example: '我的网站'
|
||||
)]
|
||||
public mixed $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '配置描述',
|
||||
type: 'string',
|
||||
example: '网站名称配置项',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'string',
|
||||
example: '1'
|
||||
)]
|
||||
public string $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '配置值响应模型',
|
||||
description: '配置值操作接口的返回数据结构'
|
||||
)]
|
||||
class ConfigValueResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '配置编码',
|
||||
type: 'string',
|
||||
example: 'site_name'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'group_code',
|
||||
description: '分组编码',
|
||||
type: 'string',
|
||||
example: 'site'
|
||||
)]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '配置名称',
|
||||
type: 'string',
|
||||
example: '网站名称'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'value',
|
||||
description: '配置值',
|
||||
type: 'mixed',
|
||||
example: '我的网站'
|
||||
)]
|
||||
public mixed $value;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '配置描述',
|
||||
type: 'string',
|
||||
example: '网站名称配置项',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data_type',
|
||||
description: '数据类型(1:字符串 2:数字 3:布尔 4:数组 5:对象)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3, 4, 5],
|
||||
example: 1
|
||||
)]
|
||||
public int $data_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2024-01-01 12:00:00'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: '2024-01-01 12:00:00',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '部门详情响应模型',
|
||||
description: '部门详情接口的返回数据结构'
|
||||
)]
|
||||
class DeptResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(description: '部门ID', type: 'string', example: '246964377436553216')]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(description: '父部门ID', type: 'string', example: null, nullable: true)]
|
||||
public ?string $pid = null;
|
||||
|
||||
#[OA\Property(description: '部门层级', type: 'integer', example: null, nullable: true)]
|
||||
public ?int $level = null;
|
||||
|
||||
#[OA\Property(description: '部门编码', type: 'string', example: 'dev')]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(description: '部门名称', type: 'string', example: '测试')]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(description: '主要负责人ID', type: 'string', example: null, nullable: true)]
|
||||
public ?string $main_leader_id = null;
|
||||
|
||||
#[OA\Property(description: '联系电话', type: 'string', example: null, nullable: true)]
|
||||
public ?string $phone = null;
|
||||
|
||||
#[OA\Property(description: '状态(1:启用,0:禁用)', type: 'integer', enum: [0, 1], example: 1)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(description: '排序号', type: 'integer', example: 1)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(description: '创建人ID', type: 'integer', example: 1)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(description: '更新人ID', type: 'integer', example: null, nullable: true)]
|
||||
public int|string|null $updated_by = null;
|
||||
|
||||
#[OA\Property(description: '创建时间', type: 'string', format: 'date-time', example: '2025-11-12T03:48:15.000000Z')]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(description: '更新时间', type: 'string', format: 'date-time', example: '2025-11-12T03:48:15.000000Z')]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(description: '删除时间', type: 'string', format: 'date-time', example: null, nullable: true)]
|
||||
public ?string $deleted_at = null;
|
||||
|
||||
#[OA\Property(description: '备注', type: 'string', example: 'sdf', nullable: true)]
|
||||
public ?string $remark = null;
|
||||
|
||||
#[OA\Property(description: '创建时间(格式化)', type: 'string', example: '2025-11-12 11:48:15')]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(description: '更新时间(格式化)', type: 'string', example: '2025-11-12 11:48:15')]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
description: '部门领导列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(ref: AdminResponse::class)
|
||||
)]
|
||||
public array $leader;
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典项详情响应模型',
|
||||
description: '字典项详情接口的返回数据结构'
|
||||
)]
|
||||
class DictItemResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '字典项ID',
|
||||
type: 'string', // 调整为字符串类型(匹配JSON中的长ID)
|
||||
example: '242218273109180416'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dict_id',
|
||||
description: '字典ID(关联主表)',
|
||||
type: 'string', // 调整为字符串类型
|
||||
example: '242218273104986112'
|
||||
)]
|
||||
public string $dict_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'label',
|
||||
description: '显示标签',
|
||||
type: 'string',
|
||||
example: '默认分组'
|
||||
)]
|
||||
public string $label;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'value',
|
||||
description: '选项值',
|
||||
type: 'string',
|
||||
example: 'value1'
|
||||
)]
|
||||
public string $value;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '字典项编码',
|
||||
type: 'string',
|
||||
example: 'default'
|
||||
)]
|
||||
public string $code; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'color',
|
||||
description: '颜色(如#4CAF50)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $color;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'other_class',
|
||||
description: '额外样式类',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $other_class; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1 // 原status字段重命名为enabled
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $created_by; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $updated_by; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_at; // 调整为可空
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_at; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date; // 新增字段
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '字典详情响应模型',
|
||||
description: '字典详情接口的返回数据结构'
|
||||
)]
|
||||
class DictResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '字典ID',
|
||||
type: 'string', // 调整为字符串类型(匹配JSON中的长ID)
|
||||
example: '242218273104986112'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'group_code',
|
||||
description: '字典分组编码',
|
||||
type: 'string',
|
||||
example: 'default'
|
||||
)]
|
||||
public string $group_code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '字典名称',
|
||||
type: 'string',
|
||||
example: '所属分组' // 原 dict_name 重命名为 name
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '字典编码(唯一)',
|
||||
type: 'string',
|
||||
example: 'sys_dict_group_code' // 原 dict_type 重命名为 code
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data_type',
|
||||
description: '数据类型(1:字符串 2:数字 3:布尔)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 1
|
||||
)]
|
||||
public int $data_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'description',
|
||||
description: '字典描述',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true // 原 remark 重命名为 description
|
||||
)]
|
||||
public ?string $description;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'string',
|
||||
example: 1
|
||||
)]
|
||||
public int|string $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'string',
|
||||
example: 1
|
||||
)]
|
||||
public int|string $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间(原始)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间(原始)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(title: '问题反馈响应')]
|
||||
class FeedbackResponse
|
||||
{
|
||||
#[OA\Property(property: 'id', description: '反馈ID', type: 'string', example: '234161405304516608')]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(property: 'type', description: '反馈类型', type: 'string', enum: ['bug', 'suggestion', 'correction'])]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(property: 'content', description: '问题描述', type: 'string')]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(property: 'contact', description: '联系方式', type: 'string', nullable: true)]
|
||||
public ?string $contact;
|
||||
|
||||
#[OA\Property(property: 'images', description: '截图附件地址数组', type: 'array', items: new OA\Items(type: 'string'), nullable: true)]
|
||||
public ?array $images;
|
||||
|
||||
#[OA\Property(property: 'source', description: '反馈来源', type: 'string', enum: ['app', 'web'])]
|
||||
public string $source;
|
||||
|
||||
#[OA\Property(property: 'reply_content', description: '管理员回复内容', type: 'string', nullable: true)]
|
||||
public ?string $reply_content;
|
||||
|
||||
#[OA\Property(property: 'reply_name', description: '回复管理员名称', type: 'string', nullable: true, example: '管理员')]
|
||||
public ?string $reply_name;
|
||||
|
||||
#[OA\Property(property: 'reply_date', description: '回复时间', type: 'string', nullable: true, example: '2026-08-26 15:30:00')]
|
||||
public ?string $reply_date;
|
||||
|
||||
#[OA\Property(property: 'created_name', description: '提交人名称,匿名提交显示匿名用户', type: 'string', example: '张三')]
|
||||
public string $created_name;
|
||||
|
||||
#[OA\Property(property: 'created_date', description: '提交时间', type: 'string', example: '2026-08-24 15:30:00')]
|
||||
public string $created_date;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '登录日志详情响应模型',
|
||||
description: '登录日志详情接口的返回数据结构'
|
||||
)]
|
||||
class LoginLogResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '日志ID',
|
||||
type: 'string',
|
||||
example: '244861012925743104'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '用户名',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '登录IP',
|
||||
type: 'string',
|
||||
example: '127.0.0.1'
|
||||
)]
|
||||
public string $ip;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip_location',
|
||||
description: 'IP归属地',
|
||||
type: 'string',
|
||||
example: '未知'
|
||||
)]
|
||||
public ?string $ip_location;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'os',
|
||||
description: '操作系统',
|
||||
type: 'string',
|
||||
example: 'Windows'
|
||||
)]
|
||||
public ?string $os;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'browser',
|
||||
description: '浏览器',
|
||||
type: 'string',
|
||||
example: 'Chrome'
|
||||
)]
|
||||
public ?string $browser;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '登录状态(1成功 0失败)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'message',
|
||||
description: '登录提示信息',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $message;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'login_time',
|
||||
description: '登录时间戳',
|
||||
type: 'integer',
|
||||
example: 1762417814
|
||||
)]
|
||||
public int $login_time;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'key',
|
||||
description: '登录会话密钥',
|
||||
type: 'string',
|
||||
example: '0c7792fa9477cd736f1cf2c27bbfff61'
|
||||
)]
|
||||
public string $key;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'expires_at',
|
||||
description: '会话过期时间戳',
|
||||
type: 'integer',
|
||||
example: 1762425014
|
||||
)]
|
||||
public int $expires_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-06T08:30:14.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-06T08:30:14.000000Z'
|
||||
)]
|
||||
public string $updated_at; // 新增字段
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(本地)',
|
||||
type: 'string',
|
||||
example: '2025-11-06 16:30:14'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(本地)',
|
||||
type: 'string',
|
||||
example: '2025-11-06 16:30:14'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '系统菜单详情响应模型',
|
||||
description: '系统菜单详情接口的返回数据结构'
|
||||
)]
|
||||
class MenuResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '菜单ID',
|
||||
type: 'string',
|
||||
example: '242218273029488640'
|
||||
)]
|
||||
public string|int $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'pid',
|
||||
description: '父菜单ID(0为顶级菜单)',
|
||||
type: 'string',
|
||||
example: 0
|
||||
)]
|
||||
public int|string $pid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'app',
|
||||
description: '所属应用',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $app;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '菜单标题',
|
||||
type: 'string',
|
||||
example: '首页'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '菜单编码',
|
||||
type: 'string',
|
||||
example: 'Dashboard'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'level',
|
||||
description: '菜单层级',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $level;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '菜单类型(1菜单 2按钮 3接口)',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号(越小越靠前)',
|
||||
type: 'integer',
|
||||
example: -1
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '路由路径',
|
||||
type: 'string',
|
||||
example: '/'
|
||||
)]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'component',
|
||||
description: '前端组件路径',
|
||||
type: 'string',
|
||||
example: 'BasicLayout'
|
||||
)]
|
||||
public string $component;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'redirect',
|
||||
description: '路由重定向',
|
||||
type: 'string',
|
||||
example: '/workspace',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $redirect;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'icon',
|
||||
description: '菜单图标(Ant Design图标)',
|
||||
type: 'string',
|
||||
example: 'ant-design:home-outlined'
|
||||
)]
|
||||
public string $icon;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_show',
|
||||
description: '是否显示(1显示 0隐藏)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $is_show;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_link',
|
||||
description: '是否外链(1是 0否)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_link;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'link_url',
|
||||
description: '外链地址',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $link_url;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'open_type',
|
||||
description: '打开方式(0当前页 1新窗口)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $open_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_cache',
|
||||
description: '是否缓存(1缓存 0不缓存)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_cache;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_sync',
|
||||
description: '是否同步路由(1同步 0不同步)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $is_sync;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_affix',
|
||||
description: '是否固定(1固定 0不固定)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_affix;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_global',
|
||||
description: '是否全局菜单(1是 0否)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_global;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'variable',
|
||||
description: '自定义变量',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $variable;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'methods',
|
||||
description: '请求方法(多个用逗号分隔)',
|
||||
type: 'string',
|
||||
example: 'get'
|
||||
)]
|
||||
public string $methods;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_frame',
|
||||
description: '是否内嵌窗口',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $is_frame;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'children',
|
||||
description: '子菜单列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(ref: MenuResponse::class),
|
||||
nullable: true
|
||||
)]
|
||||
public ?array $children; // 嵌套子菜单
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '消息详情响应模型',
|
||||
description: '消息详情接口的返回数据结构'
|
||||
)]
|
||||
class MessageResponse
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '消息ID(雪花ID)',
|
||||
type: 'string',
|
||||
example: '245329792713883648'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '消息类型',
|
||||
type: 'string',
|
||||
enum: ['message', 'notification', 'broadcast'],
|
||||
example: 'message'
|
||||
)]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '消息标题',
|
||||
type: 'string',
|
||||
example: '111111111111111'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '消息内容',
|
||||
type: 'string',
|
||||
example: '222222222222222222222'
|
||||
)]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sender_id',
|
||||
description: '发送者ID(0表示系统)',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $sender_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'receiver_id',
|
||||
description: '接收者ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $receiver_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'status',
|
||||
description: '阅读状态',
|
||||
type: 'string',
|
||||
enum: ['read', 'unread'],
|
||||
example: 'read'
|
||||
)]
|
||||
public string $status;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'priority',
|
||||
description: '优先级(1普通 2重要 3紧急)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3],
|
||||
example: 1
|
||||
)]
|
||||
public int $priority;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'channel',
|
||||
description: '推送渠道',
|
||||
type: 'string',
|
||||
example: 'backend-admin-1-*'
|
||||
)]
|
||||
public string $channel;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'related_id',
|
||||
description: '关联业务ID',
|
||||
type: 'string',
|
||||
example: '234161405304516608',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $related_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'related_type',
|
||||
description: '关联业务类型',
|
||||
type: 'string',
|
||||
example: '',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $related_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'jump_params',
|
||||
description: '跳转参数',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?array $jump_params;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'message_uuid',
|
||||
description: '消息唯一标识',
|
||||
type: 'string',
|
||||
example: 'a6a0ff4f-81dc-c033-083e-99611865251c'
|
||||
)]
|
||||
public string $message_uuid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-07T15:33:00.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'expired_at',
|
||||
description: '过期时间戳',
|
||||
type: 'integer',
|
||||
example: 152336572961580
|
||||
)]
|
||||
public int $expired_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'read_at',
|
||||
description: '阅读时间戳',
|
||||
type: 'integer',
|
||||
example: 1762610591,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $read_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间(UTC)',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-08T14:03:11.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建时间(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-07 23:33:00'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新时间(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-08 22:03:11'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'read_date',
|
||||
description: '阅读时间(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-08 22:03:11',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $read_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sender',
|
||||
description: '发送者信息',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?array $sender;
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '系统公告详情响应模型',
|
||||
description: '系统公告详情接口的返回数据结构'
|
||||
)]
|
||||
class NoticeResponse
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '公告ID',
|
||||
type: 'string',
|
||||
example: '234161405304516608'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'type',
|
||||
description: '公告类型',
|
||||
type: 'string',
|
||||
enum: ['notice', 'announcement', 'alert'],
|
||||
example: 'notice'
|
||||
)]
|
||||
public string $type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'title',
|
||||
description: '公告标题',
|
||||
type: 'string',
|
||||
example: '111111111111111'
|
||||
)]
|
||||
public string $title;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content',
|
||||
description: '公告内容',
|
||||
type: 'string',
|
||||
example: '222222222222222222222'
|
||||
)]
|
||||
public string $content;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否启用(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'uuid',
|
||||
description: '唯一标识',
|
||||
type: 'string',
|
||||
example: 'a6a0ff4f-81dc-c033-083e-99611865251c'
|
||||
)]
|
||||
public string $uuid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_dept',
|
||||
description: '创建部门',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $created_dept;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-07T19:53:49.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-21T13:43:42.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-08 03:53:49'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-21 21:43:42'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '操作日志详情响应模型',
|
||||
description: '操作日志详情接口的返回数据结构'
|
||||
)]
|
||||
class OperateLogResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '日志ID',
|
||||
type: 'string',
|
||||
example: '233375369209069568'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '操作名称',
|
||||
type: 'string',
|
||||
example: '数据字典'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'app',
|
||||
description: '应用名称',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $app;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '操作IP',
|
||||
type: 'string',
|
||||
example: '220.165.172.45'
|
||||
)]
|
||||
public string $ip;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip_location',
|
||||
description: 'IP归属地',
|
||||
type: 'string',
|
||||
example: '未知'
|
||||
)]
|
||||
public ?string $ip_location;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'browser',
|
||||
description: '浏览器',
|
||||
type: 'string',
|
||||
example: 'Chrome'
|
||||
)]
|
||||
public ?string $browser;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'os',
|
||||
description: '操作系统',
|
||||
type: 'string',
|
||||
example: 'Windows'
|
||||
)]
|
||||
public ?string $os;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'url',
|
||||
description: '请求URL',
|
||||
type: 'string',
|
||||
example: '/system/dict'
|
||||
)]
|
||||
public string $url;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'class_name',
|
||||
description: '控制器类名',
|
||||
type: 'string',
|
||||
example: 'app\\admin\\controller\\system\\SysDictController'
|
||||
)]
|
||||
public string $class_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'action',
|
||||
description: '操作方法',
|
||||
type: 'string',
|
||||
example: 'index'
|
||||
)]
|
||||
public string $action;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'method',
|
||||
description: '请求方法',
|
||||
type: 'string',
|
||||
enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
|
||||
example: 'GET'
|
||||
)]
|
||||
public string $method;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'param',
|
||||
description: '请求参数',
|
||||
type: 'object',
|
||||
example: '{"page":"1","limit":"20"}'
|
||||
)]
|
||||
public array $param;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'user_name',
|
||||
description: '操作用户',
|
||||
type: 'string',
|
||||
example: 'admin'
|
||||
)]
|
||||
public string $user_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '操作时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-05T15:50:23.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-05T15:50:23.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '操作日期(本地)',
|
||||
type: 'string',
|
||||
example: '2025-10-05 23:50:23'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(本地)',
|
||||
type: 'string',
|
||||
example: '2025-10-05 23:50:23'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '岗位详情响应模型',
|
||||
description: '岗位详情接口的返回数据结构'
|
||||
)]
|
||||
class PostResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '岗位ID',
|
||||
type: 'string',
|
||||
example: '247048545520582656'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'dept_id',
|
||||
description: '部门ID',
|
||||
type: 'string',
|
||||
example: '246996721795072000'
|
||||
)]
|
||||
public string $dept_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '岗位编码',
|
||||
type: 'string',
|
||||
example: 'SDF'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '岗位名称',
|
||||
type: 'string',
|
||||
example: 'AD'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1启用 0禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-12T09:22:43.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-11-12T09:22:43.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: 'ASDF',
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-12 17:22:43'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(本地格式化)',
|
||||
type: 'string',
|
||||
example: '2025-11-12 17:22:43'
|
||||
)]
|
||||
public string $updated_date;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '回收站记录详情响应模型',
|
||||
description: '回收站记录详情接口的返回数据结构'
|
||||
)]
|
||||
class RecycleBinResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: 'ID',
|
||||
type: 'string',
|
||||
example: '123456789012345678'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'original_id',
|
||||
description: '原始数据ID',
|
||||
type: 'string',
|
||||
example: '232593675996626944'
|
||||
)]
|
||||
public string $original_id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data',
|
||||
description: '回收数据',
|
||||
type: 'object',
|
||||
example: ['id' => 100, 'name' => '测试数据']
|
||||
)]
|
||||
public array $data;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'table_name',
|
||||
description: '数据表名',
|
||||
type: 'string',
|
||||
example: 'sys_upload'
|
||||
)]
|
||||
public string $table_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'table_prefix',
|
||||
description: '数据表前缀',
|
||||
type: 'string',
|
||||
example: 'ma_'
|
||||
)]
|
||||
public string $table_prefix;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '是否已还原(0=未还原,1=已还原)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ip',
|
||||
description: '操作IP',
|
||||
type: 'string',
|
||||
example: '223.152.76.8'
|
||||
)]
|
||||
public string $ip;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'operate_by',
|
||||
description: '操作人ID',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $operate_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-03T12:14:38.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-03T12:14:38.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-03 20:14:38'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-03 20:14:38'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'operate_name',
|
||||
description: '操作人名称',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $operate_name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'operate',
|
||||
description: '操作类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $operate;
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '角色详情响应模型',
|
||||
description: '角色详情接口的返回数据结构'
|
||||
)]
|
||||
class RoleResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '角色ID',
|
||||
type: 'string',
|
||||
example: '239312652730916864'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'pid',
|
||||
description: '父角色ID',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $pid;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'name',
|
||||
description: '角色名称',
|
||||
type: 'string',
|
||||
example: '测试'
|
||||
)]
|
||||
public string $name;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'code',
|
||||
description: '角色编码',
|
||||
type: 'string',
|
||||
example: 'dev'
|
||||
)]
|
||||
public string $code;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'is_super_admin',
|
||||
description: '是否超级管理员(0=否,1=是)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 0
|
||||
)]
|
||||
public int $is_super_admin;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'role_type',
|
||||
description: '角色类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $role_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'data_scope',
|
||||
description: '数据范围(1:全部数据 2:自定义 3:本部门 4:本部门及以下 5:本人)',
|
||||
type: 'integer',
|
||||
enum: [1, 2, 3, 4, 5],
|
||||
example: 1
|
||||
)]
|
||||
public int $data_scope;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'enabled',
|
||||
description: '状态(1:启用 0:禁用)',
|
||||
type: 'integer',
|
||||
enum: [0, 1],
|
||||
example: 1
|
||||
)]
|
||||
public int $enabled;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'sort',
|
||||
description: '排序号',
|
||||
type: 'integer',
|
||||
example: 0
|
||||
)]
|
||||
public int $sort;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'remark',
|
||||
description: '备注',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $remark = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 1
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '创建时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-22T01:03:02.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-22T01:03:02.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'deleted_at',
|
||||
description: '删除时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $deleted_at = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-22 09:03:02'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期(格式化)',
|
||||
type: 'string',
|
||||
example: '2025-10-22 09:03:02'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'casbin',
|
||||
description: '角色权限列表',
|
||||
type: 'array',
|
||||
items: new OA\Items(
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'string', example: '239312654937120768'),
|
||||
new OA\Property(property: 'ptype', type: 'string', example: 'p'),
|
||||
new OA\Property(property: 'v0', type: 'string', example: 'role:239312652730916864'),
|
||||
new OA\Property(property: 'v1', type: 'string', example: 'domain:1'),
|
||||
new OA\Property(property: 'v2', type: 'string', example: 'menu:/'),
|
||||
new OA\Property(property: 'v3', type: 'string', example: '*'),
|
||||
new OA\Property(property: 'v4', type: 'string', example: 'get'),
|
||||
new OA\Property(property: 'v5', type: 'string', example: 'menu:232462703808479232'),
|
||||
new OA\Property(
|
||||
property: 'pivot',
|
||||
properties: [
|
||||
new OA\Property(property: 'role_id', type: 'string', example: '239312652730916864'),
|
||||
new OA\Property(property: 'role_casbin_id', type: 'string', example: 'role:239312652730916864')
|
||||
],
|
||||
type: 'object'
|
||||
)
|
||||
],
|
||||
type: 'object'
|
||||
)
|
||||
)]
|
||||
public array $casbin;
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\adminapi\schema\response\system;
|
||||
|
||||
use madong\swagger\schema\BaseResponseDTO;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '文件上传响应模型',
|
||||
description: '文件上传/下载接口的返回数据结构'
|
||||
)]
|
||||
class UploadResponse extends BaseResponseDTO
|
||||
{
|
||||
#[OA\Property(
|
||||
property: 'id',
|
||||
description: '文件ID',
|
||||
type: 'string',
|
||||
example: '234982712740941824'
|
||||
)]
|
||||
public string $id;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'url',
|
||||
description: '访问URL',
|
||||
type: 'string',
|
||||
example: 'http://43.138.153.216:8899/upload/42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $url;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'size',
|
||||
description: '文件大小(字节)',
|
||||
type: 'integer',
|
||||
example: 6308
|
||||
)]
|
||||
public int $size;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'size_info',
|
||||
description: '文件大小格式化显示',
|
||||
type: 'string',
|
||||
example: '6.16 KB'
|
||||
)]
|
||||
public string $size_info;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'hash',
|
||||
description: '文件哈希值',
|
||||
type: 'string',
|
||||
example: '42f86b9b36794fb9e380917c251f6d81'
|
||||
)]
|
||||
public string $hash;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'filename',
|
||||
description: '存储文件名',
|
||||
type: 'string',
|
||||
example: '42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $filename;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'original_filename',
|
||||
description: '原始文件名',
|
||||
type: 'string',
|
||||
example: 'logo.png'
|
||||
)]
|
||||
public string $original_filename;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'base_path',
|
||||
description: '基础存储路径',
|
||||
type: 'string',
|
||||
example: '/upload/42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $base_path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'path',
|
||||
description: '服务器存储路径',
|
||||
type: 'string',
|
||||
example: '/www/wwwroot/playground/madong-admin-saas/server/public/upload/42f86b9b36794fb9e380917c251f6d81.png'
|
||||
)]
|
||||
public string $path;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'ext',
|
||||
description: '文件扩展名',
|
||||
type: 'string',
|
||||
example: 'png'
|
||||
)]
|
||||
public string $ext;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'content_type',
|
||||
description: '文件MIME类型',
|
||||
type: 'string',
|
||||
example: 'image/png'
|
||||
)]
|
||||
public string $content_type;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'platform',
|
||||
description: '存储平台',
|
||||
type: 'string',
|
||||
example: 'local'
|
||||
)]
|
||||
public string $platform;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_url',
|
||||
description: '缩略图URL',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_url = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_filename',
|
||||
description: '缩略图文件名',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_filename = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_size',
|
||||
description: '缩略图大小(字节)',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $th_size = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_size_info',
|
||||
description: '缩略图大小格式化显示',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_size_info = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'th_content_type',
|
||||
description: '缩略图MIME类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $th_content_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'object_id',
|
||||
description: '关联对象ID',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $object_id = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'object_type',
|
||||
description: '关联对象类型',
|
||||
type: 'string',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?string $object_type = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'attr',
|
||||
description: '额外属性',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?object $attr = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_at',
|
||||
description: '上传时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T02:17:24.000000Z'
|
||||
)]
|
||||
public string $created_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_at',
|
||||
description: '更新时间',
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
example: '2025-10-10T02:17:24.000000Z'
|
||||
)]
|
||||
public string $updated_at;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_by',
|
||||
description: '创建人ID',
|
||||
type: 'integer',
|
||||
example: 2
|
||||
)]
|
||||
public int $created_by;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_by',
|
||||
description: '更新人ID',
|
||||
type: 'integer',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?int $updated_by = null;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'created_date',
|
||||
description: '创建日期',
|
||||
type: 'string',
|
||||
example: '2025-10-10 10:17:24'
|
||||
)]
|
||||
public string $created_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updated_date',
|
||||
description: '更新日期',
|
||||
type: 'string',
|
||||
example: '2025-10-10 10:17:24'
|
||||
)]
|
||||
public string $updated_date;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'createds',
|
||||
description: '创建人详情',
|
||||
properties: [
|
||||
new OA\Property(property: 'id', type: 'string', example: '2'),
|
||||
new OA\Property(property: 'created_name', type: 'string', example: '超级管理员'),
|
||||
new OA\Property(property: 'created_date', type: 'string', nullable: true, example: null),
|
||||
new OA\Property(property: 'updated_date', type: 'string', nullable: true, example: null)
|
||||
],
|
||||
type: 'object'
|
||||
)]
|
||||
public object $createds;
|
||||
|
||||
#[OA\Property(
|
||||
property: 'updateds',
|
||||
description: '更新人详情',
|
||||
type: 'object',
|
||||
example: null,
|
||||
nullable: true
|
||||
)]
|
||||
public ?object $updateds = null;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system\menu;
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '菜单元信息【Art】',
|
||||
description: 'Madong-Art-Ui菜单的元信息(排序、标题、图标、权限等)'
|
||||
)]
|
||||
class ArtMenuMetaResponse
|
||||
{
|
||||
public function __construct(
|
||||
#[OA\Property(
|
||||
description: '排序序号(用于菜单排序)',
|
||||
type: 'integer',
|
||||
example: 10
|
||||
)]
|
||||
public int $order,
|
||||
|
||||
#[OA\Property(
|
||||
description: '菜单标题(显示名称)',
|
||||
type: 'string',
|
||||
example: '系统设置'
|
||||
)]
|
||||
public string $title,
|
||||
|
||||
#[OA\Property(
|
||||
description: '菜单图标(支持图标库类名或 Unicode)',
|
||||
type: 'string',
|
||||
example: 'ant-design:setting-outlined'
|
||||
)]
|
||||
public string $icon,
|
||||
|
||||
#[OA\Property(
|
||||
description: '访问角色列表(为空表示无角色限制)',
|
||||
type: 'array',
|
||||
items: new OA\Items(type: 'string'),
|
||||
example: ["R_SUPER", "R_ADMIN"]
|
||||
)]
|
||||
public ?array $roles = null,
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否缓存组件(true=缓存,false=不缓存)',
|
||||
type: 'boolean',
|
||||
example: true
|
||||
)]
|
||||
public ?bool $keepAlive = null,
|
||||
|
||||
#[OA\Property(
|
||||
description: '是否固定标签页(true=固定,false=不固定)',
|
||||
type: 'boolean',
|
||||
example: false
|
||||
)]
|
||||
public ?bool $fixedTab = null,
|
||||
|
||||
#[OA\Property(
|
||||
description: '权限列表(用于细粒度权限控制)',
|
||||
type: 'array',
|
||||
items: new OA\Items(
|
||||
type: 'object',
|
||||
properties: [
|
||||
new OA\Property(property: 'title', type: 'string',example: '超级管理员'),
|
||||
new OA\Property(property: 'authMark', type: 'string', example: 'admin')
|
||||
]
|
||||
),
|
||||
example: [
|
||||
['title' => '超级管理员', 'authMark' => 'admin']
|
||||
]
|
||||
)]
|
||||
public ?array $authList = null
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
namespace app\adminapi\schema\response\system\menu;
|
||||
|
||||
|
||||
use OpenApi\Attributes as OA;
|
||||
|
||||
#[OA\Schema(
|
||||
title: '菜单结构响应模型【Art】',
|
||||
description: 'Madong-Art-Ui系统菜单数据结构'
|
||||
)]
|
||||
class ArtMenuResponse
|
||||
{
|
||||
/**
|
||||
* @var ArtMenuResponse[] 子菜单列表(同步更新子菜单类型)
|
||||
*/
|
||||
#[OA\Property(description: '子菜单', type: 'array', items: new OA\Items(ref: '#/components/schemas/ArtMenuSchema'))]
|
||||
public array $children = [];
|
||||
|
||||
public function __construct(
|
||||
#[OA\Property(description: '菜单名称', type: 'string')]
|
||||
public string $name,
|
||||
|
||||
#[OA\Property(description: '路由路径', type: 'string')]
|
||||
public string $path,
|
||||
|
||||
#[OA\Property(description: '组件路径', type: 'string')]
|
||||
public string|null $components,
|
||||
|
||||
// 关联元数据 schema(同步修改为 MenuMetaSchema)
|
||||
#[OA\Property( ref: ArtMenuMetaResponse::class,description: '元数据')]
|
||||
public ArtMenuMetaResponse $meta,
|
||||
|
||||
?array $children
|
||||
) {
|
||||
if ($children !== null) {
|
||||
// 递归转换子菜单为 ArtMenuSchema 对象
|
||||
$this->children = array_map(
|
||||
fn(array $child) => new self(
|
||||
$child['name'],
|
||||
$child['path'],
|
||||
$child['component'] ?? null,
|
||||
new ArtMenuMetaResponse(
|
||||
order: $child['meta']['order']??0,
|
||||
title: $child['meta']['title']??'',
|
||||
icon: $child['meta']['icon']??'',
|
||||
roles: $child['meta']['roles'] ?? null,
|
||||
keepAlive: $child['meta']['keepAlive'] ?? null,
|
||||
fixedTab: $child['meta']['fixedTab'] ?? null,
|
||||
authList: $child['meta']['authList'] ?? null
|
||||
),
|
||||
$child['children'] ?? null
|
||||
),
|
||||
$children
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user