numberBetween(10000, 1000000); $discount = fake()->numberBetween(0, $subtotal); return [ 'customer_id' => Customer::factory(), 'created_by_id' => User::factory(), 'order_number' => fake()->unique()->numerify('ORD-####'), 'channel' => fake()->randomElement(['store', 'shopee', 'tiktok']), 'price_type' => fake()->randomElement(['retail', 'wholesale']), 'status' => 'pending', 'payment_type' => fake()->randomElement(['cash', 'transfer', 'marketplace', 'qris']), 'subtotal' => $subtotal, 'discount' => $discount, 'total_amount' => $subtotal - $discount, 'notes' => fake()->sentence(), ]; } }