feat(bottle): membuat key point_per_pcs

This commit is contained in:
Yoga Pangestu 2025-12-08 09:17:34 +07:00
parent a79272635c
commit 2d418b7a8a

View File

@ -11,12 +11,15 @@ class BottleFactory extends Factory
{
public function definition(): array
{
$costPrice = $this->faker->randomNumber(2);
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),
'point_per_pcs' => round($costPrice / 100),
'description' => $this->faker->sentence(),
];
}