初始化本地仓库

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