mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-18 20:34:52 +00:00
🚀 **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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user