Boost-Slot-Grenzen (5/3) + Kategorie-Boost zum halben Satz
Entscheidung 13.07.: verkauft wird nur, was sichtbar ist — max. 5 gleichzeitige Boosts je Startseite, 3 je Branchenseite (= die sichtbaren Plaetze; Hero-Slider damit vertagt). Neue Stufe Kategorie-Boost (nur Branchenseite, 6/10/18 Credits = 50 % aufgerundet); der Startseiten-Boost (12/20/35) erscheint weiter auf Start- UND Branchenseite. - boosts.placement (home/category, Bestand = home) + BoostPlacement-Enum; Preise/Slots in config/credits.php (boost_category, boost_slots) - BoostService::slotAvailability() je Ausgabe (Portal x Sprache, Kategorie zusaetzlich je Rubrik); ausgebucht -> soldOut-Exception mit fruehestem freien Termin; Verlaengerungen halten ihren Slot, Stufen verlaengern unabhaengig; Kategorie-Boost invalidiert nur Kategorie-Caches - Startseite zeigt nur Home-Boosts; Branchenseite: Kategorie-Boosts mit Vorrang (ihre 3 Slots sind die Garantie), Home-Boosts fuellen den Rest - Add-on-Panel der PM-Seite: zwei Boost-Angebote, bei vollem Inventar "Derzeit ausgebucht — frei ab" statt Kauf-Buttons (serverseitig gegated); Buchungsseiten-Preisliste um die Kategorie-Staffel ergaenzt Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0677728d05
commit
0474d22347
19 changed files with 702 additions and 98 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\BoostPlacement;
|
||||
use App\Models\Boost;
|
||||
use App\Models\PressRelease;
|
||||
use App\Models\User;
|
||||
|
|
@ -20,6 +21,7 @@ class BoostFactory extends Factory
|
|||
return [
|
||||
'press_release_id' => PressRelease::factory(),
|
||||
'user_id' => User::factory(),
|
||||
'placement' => BoostPlacement::Home,
|
||||
'days' => 7,
|
||||
'credits_charged' => 12,
|
||||
'starts_at' => now(),
|
||||
|
|
@ -34,4 +36,15 @@ class BoostFactory extends Factory
|
|||
'ends_at' => now()->subDay(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Kategorie-Boost (nur Branchenseite, halber Satz).
|
||||
*/
|
||||
public function category(): static
|
||||
{
|
||||
return $this->state(fn (): array => [
|
||||
'placement' => BoostPlacement::Category,
|
||||
'credits_charged' => 6,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Boost-Stufen (Entscheidung 13.07.2026): `home` = Startseiten-Boost
|
||||
* (Startseite + Branchenseite, voller Preis), `category` = Kategorie-Boost
|
||||
* (nur Branchenseite, halber Preis). Bestehende Boosts sind Startseiten-Boosts
|
||||
* (bisheriges Verhalten). Der Index trägt die Slot-Zählung je Stufe.
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('boosts', function (Blueprint $table): void {
|
||||
$table->string('placement', 20)->default('home')->after('user_id');
|
||||
|
||||
$table->index(['placement', 'ends_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('boosts', function (Blueprint $table): void {
|
||||
$table->dropIndex(['placement', 'ends_at']);
|
||||
$table->dropColumn('placement');
|
||||
});
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue