<?php

namespace Database\Factories;

use App\Models\Bottle;
use Illuminate\Database\Eloquent\Factories\Factory;

class BottleFactory extends Factory
{
    protected $model = Bottle::class;

    public function definition(): array
    {
        return [
            'name' => $this->faker->word(),
            'slug' => $this->faker->slug(),
            'size' => $this->faker->randomNumber(2),
            'cost_price' => $this->faker->randomNumber(2),
            'sale_price' => $this->faker->randomNumber(2),
        ];
    }

    public function withDescription(): Factory
    {
        return $this->state(fn () => ['description' => $this->faker->sentence()]);
    }
}
