<?php

namespace Database\Factories;

use App\Enums\DietType;
use App\Enums\MealPostVisibility;
use App\Models\MealPosts;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;

class MealPostsFactory extends Factory
{
    protected $model = MealPosts::class;

    public function definition(): array
    {
        return [
            'image_url' => $this->faker->imageUrl(),
            'caption' => $this->faker->word(),
            'calories' => $this->faker->randomNumber(),
            'proteins' => $this->faker->randomFloat(),
            'carbs' => $this->faker->randomFloat(),
            'fats' => $this->faker->randomFloat(),
            'title' => $this->faker->word(),
            'eaten_at' => Carbon::now(),
            'visibility' => MealPostVisibility::Private,
            'ai_generated' => false,
            'diet_type' => DietType::OMNIVORE,
            'created_at' => Carbon::now(),
            'updated_at' => Carbon::now(),

            'user_id' => User::factory(),
        ];
    }
}
