From 2d418b7a8ae5bf0325e89d82cf26c6389a9abba5 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Mon, 8 Dec 2025 09:17:34 +0700 Subject: [PATCH] feat(bottle): membuat key point_per_pcs --- database/factories/BottleFactory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database/factories/BottleFactory.php b/database/factories/BottleFactory.php index c110785..d2a84a3 100644 --- a/database/factories/BottleFactory.php +++ b/database/factories/BottleFactory.php @@ -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(), ]; }