Files
fuel-price/database/factories/UserNotificationPreferenceFactory.php
Ovidiu U 4220b1b86a
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled
Add subscription tiers, notification preferences, and logging infrastructure
- Add database migrations for plans, subscriptions, notification preferences, and notification log tables
- Implement DispatchUserNotificationJob to handle channel resolution, daily limits, and logging (sent/tier_restricted/daily_limit)
- Add SendScheduledWhatsAppJob for scheduled notification delivery
- Create PlanFeatures service to resolve tier capabilities, check daily limits, and validate fuel
2026-04-14 16:20:51 +01:00

25 lines
626 B
PHP

<?php
namespace Database\Factories;
use App\Enums\FuelType;
use App\Models\User;
use App\Models\UserNotificationPreference;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<UserNotificationPreference>
*/
class UserNotificationPreferenceFactory extends Factory
{
public function definition(): array
{
return [
'user_id' => User::factory(),
'channel' => fake()->randomElement(['email', 'push', 'whatsapp', 'sms']),
'fuel_type' => fake()->randomElement(array_column(FuelType::cases(), 'value')),
'enabled' => true,
];
}
}