feat(publish-plan): add publish plan query and API routes

- Introduced `buildPublishPlanQuery` method in `DyVideoCron` model to create a base query for the publish plan module, filtering records based on user ID and project status.
- Added new API routes under `v1/publish-plan` for listing, starting, and stopping publish plans, requiring user authentication.
This commit is contained in:
nepiedg
2026-04-02 09:00:48 +00:00
parent c909ebdf88
commit 044586d60a
5 changed files with 896 additions and 0 deletions
+8
View File
@@ -4,6 +4,7 @@ declare(strict_types=1);
use think\facade\Route;
use app\api\controller\v1\Auth;
use app\api\controller\v1\Platform;
use app\api\controller\v1\PublishPlan;
/**
* API 应用路由
@@ -25,3 +26,10 @@ Route::group('v1/auth', function () {
Route::group('v1/platform', function () {
Route::get('accounts', [Platform::class, 'accounts']);
})->middleware(\app\api\middleware\Auth::class);
// v1 发布计划接口(需登录)
Route::group('v1/publish-plan', function () {
Route::get('list', [PublishPlan::class, 'index']);
Route::post('start/:id', [PublishPlan::class, 'start']);
Route::post('stop/:id', [PublishPlan::class, 'stop']);
})->middleware(\app\api\middleware\Auth::class);