<?php

namespace Database\Factories;

use App\Enums\CampaignStatus;
use App\Models\Campaign;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;

class CampaignFactory extends Factory
{
    protected $model = Campaign::class;

    public function definition(): array
    {
        return [
            'slug' => $this->faker->slug(),
            'data_attribute' => [
                'name' => $this->faker->words(2, true),
                'description' => '<p></p>',
                'logo' => '01K9EHJS3D10H2PNNH6SGMMTJ4.png',
                'redirect_url' => 'https://google.com',
            ],
            'status' => $this->faker->randomElement(CampaignStatus::cases()),
            'created_at' => Carbon::now(),
            'updated_at' => Carbon::now(),
        ];
    }
}
