Foundational layer for the YouTube Content Creation System project, built as a fully independent domain per the earlier decision (task #47) — no foreign keys into the existing projects/tasks/ideas tables. Schema: video_projects, workflow_steps, assets, ai_providers, workflow_templates (named to avoid colliding with the existing Post-templates `templates` table). WorkflowEngine (app/Support/VideoWorkflow/) drives a project's step sequence: start/startFromTemplate, currentStep, completeStep (with optional approval gating), approveStep/rejectStep, failStep/retryStep, skipStep. It only manages state transitions — actual step execution (AI calls, rendering, etc.) is out of scope here (tasks #33+). Also fixes four Publisher classes (WordPress/Reddit/Twitter/LinkedIn) that were missing a `use App\Models\SocialAccount;` import after an earlier interface change, which broke the entire test suite at bootstrap; and PostFactory, which still set the now-removed `social_account_id` column instead of the SocialAccount pivot. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
677 B
PHP
25 lines
677 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\WorkflowTemplate;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class WorkflowTemplateFactory extends Factory
|
|
{
|
|
protected $model = WorkflowTemplate::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => fake()->sentence(3),
|
|
'description' => fake()->optional()->sentence(),
|
|
'steps' => [
|
|
['type' => 'script_generation', 'requires_approval' => true],
|
|
['type' => 'tts_voiceover', 'requires_approval' => false],
|
|
['type' => 'video_generation', 'requires_approval' => true],
|
|
],
|
|
];
|
|
}
|
|
}
|