'datetime', 'settings' => 'array', 'is_active' => 'boolean', 'name' => 'array', 'description' => 'array', ]; public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } public function eventType(): BelongsTo { return $this->belongsTo(EventType::class); } public function photos(): HasMany { return $this->hasMany(Photo::class); } public function taskCollections(): BelongsToMany { return $this->belongsToMany( TaskCollection::class, 'event_task_collection', 'event_id', 'task_collection_id' ); } public function tasks(): BelongsToMany { return $this->belongsToMany(Task::class, 'event_task', 'event_id', 'task_id') ->withTimestamps(); } public function eventPackage(): BelongsTo { return $this->belongsTo(EventPackage::class); } public function hasActivePackage(): bool { return $this->eventPackage && $this->eventPackage->isActive(); } public function getPackageLimits(): array { if (!$this->hasActivePackage()) { return []; } return $this->eventPackage->package->limits; } public function canUploadPhoto(): bool { if (!$this->hasActivePackage()) { return false; } return $this->eventPackage->canUploadPhoto(); } }