RsvpStatus::class, 'rsvp_responded_at' => 'datetime', 'invited_at' => 'datetime', ]; } // Relationships public function event(): BelongsTo { return $this->belongsTo(Event::class); } public function user(): BelongsTo { return $this->belongsTo(User::class); } // Helper methods public function isPending(): bool { return $this->rsvp_status === RsvpStatus::Pending; } public function isAvailable(): bool { return $this->rsvp_status === RsvpStatus::Available; } public function hasResponded(): bool { return $this->rsvp_responded_at !== null; } }