removed all references to credits. now credits are completely replaced by addons.

This commit is contained in:
Codex Agent
2025-12-01 15:50:17 +01:00
parent b8e515a03c
commit 28539754a7
76 changed files with 97 additions and 2533 deletions

View File

@@ -33,8 +33,8 @@
Basierend auf aktueller Code-Analyse und Implementierung:
- **Phase 1 (Foundation)**: ✅ VollstÃÆÃ¤ndig abgeschlossen – Migrationen ausgefÃÆÃ¼hrt, Sanctum konfiguriert, OAuthController (PKCE-Flow, JWT), Middleware (TenantTokenGuard, TenantIsolation) implementiert und registriert.
- **Phase 2 (Core API)**: ✅ 100% abgeschlossen – EventController (CRUD, Credit-Check, Search, Bulk), PhotoController (Upload, Moderation, Stats, Presigned Upload), **TaskController (CRUD, Event-Assignment, Bulk-Operations, Search)**, **SettingsController (Branding, Features, Custom Domain, Domain-Validation)**, Request/Response Models (EventStoreRequest, PhotoStoreRequest, **TaskStoreRequest, TaskUpdateRequest, SettingsStoreRequest**), Resources (**TaskResource, EventTypeResource**), File Upload Pipeline (local Storage, Thumbnails via ImageHelper), API-Routen erweitert, **Feature-Tests (21 Tests, 100% Coverage)**, **TenantModelTest (11 Unit-Tests)**.
- **Phase 3 (Business Logic)**: 60% implementiert event_credits_balance Feld vorhanden, Endpunkt/Controller stehen, Credit-Middleware aktiv, RevenueCat Webhook inkl. Queue/Retries produktionsreif; Token-Rotation folgt.
- **Phase 4 (Admin & Monitoring)**: 45% implementiert **TenantResource erweitert (credits, features, activeSubscription)**, PurchaseHistory/OAuthClient-Management sowie Dashboard-Widgets fertig; verbleibend sind Advanced Actions (subscription_tier) und erweiterte Monitoring-Policies.
- **Phase 3 (Business Logic)**: 60% implementiert (Legacy Credits entfernt), Packages/Add-ons aktiv; RevenueCat Webhook inkl. Queue/Retries produktionsreif; Token-Rotation folgt.
- **Phase 4 (Admin & Monitoring)**: 45% implementiert **TenantResource erweitert (packages, features, activeSubscription)**, PurchaseHistory/OAuthClient-Management sowie Dashboard-Widgets fertig; verbleibend sind Advanced Actions (subscription_tier) und erweiterte Monitoring-Policies.
**Gesamtaufwand reduziert**: Von 2-3 Wochen auf **4-5 Tage**, da Phase 2 vollstÃÆÃ¤ndig abgeschlossen und Tests implementiert.
@@ -90,7 +90,7 @@ Basierend auf aktueller Code-Analyse und Implementierung:
- Credit-Management, Webhooks, Security
### Implementierter Fortschritt
- [x] Credit-Feld in Tenant-Model mit `event_credits_balance`
- [x] Legacy credit fields removed; package usage enforced
- [x] **Tenant::decrementCredits()/incrementCredits() Methoden** inkl. Logging implementiert
- [x] Credit-Middleware & Route-Alias greifen vor Event-Create; `Tenant::consumeEventAllowance()` nutzt zuerst Reseller-Pakete, sonst Credits
- [x] RevenueCat-Webhook: Signatur-Validierung, Queue-Konfiguration, Retry (`tries/backoff`) + Produkt-Mapping
@@ -113,13 +113,13 @@ Basierend auf aktueller Code-Analyse und Implementierung:
- Analytics Dashboard, Testing
### Implementierter Fortschritt
- [x] **TenantResource erweitert**: credits, features, activeSubscription Attribute
- [x] **TenantResource erweitert**: packages, features, activeSubscription Attribute
- [x] **TenantModelTest**: 11 Unit-Tests fÃÆÃ¼r Beziehungen (events, photos, purchases), Attribute, Methoden
- [x] PurchaseHistoryResource, OAuthClientResource, Widgets, Policies
### Verbleibende Tasks
1. **Filament Resources erweitern (2 Tage)**
- TenantResource: subscription_tier, Actions (add_credits, suspend), RelationsManager *(Credits-Aktion fertig; subscription_tier-Actions noch offen)*
- TenantResource: subscription_tier, Actions (packages), RelationsManager *(Credits-Aktion entfernt; subscription_tier-Actions noch offen)*
- PurchaseHistoryResource: CRUD, Filter, Export, Refund *(CRUD & Export umgesetzt; Refund via UI noch offen)*
- OAuthClientResource: Client-Management *(implementiert)*
- TenantPolicy mit superadmin before() *(implementiert)*