🚀 **Automate Meetup Activity Recalculation**

- Introduced `recalculateActivity` method in `Meetup` model to centralize activity and event timestamp updates.
- Added `MeetupEventObserver` to trigger activity recalculation on event save/delete.
- Updated `/meetups:update-activity` command to leverage the new model method for cleanup.
- Enhanced tests to cover various `MeetupEvent` scenarios affecting activity states.
This commit is contained in:
HolgerHatGarKeineNode
2026-05-17 18:13:37 +02:00
parent 71a4898303
commit 308cd8a611
5 changed files with 104 additions and 42 deletions
+3
View File
@@ -3,10 +3,13 @@
namespace App\Models;
use App\Enums\RecurrenceType;
use App\Observers\MeetupEventObserver;
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[ObservedBy([MeetupEventObserver::class])]
class MeetupEvent extends Model
{
use HasFactory;