'boolean', 'display_order' => 'integer', ]; /** * Get the tenant that owns the folder */ public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } /** * Get all files in this folder */ public function files(): HasMany { return $this->hasMany(File::class); } /** * Scope: Active folders only */ public function scopeActive($query) { return $query->where('is_active', true); } /** * Scope: Ordered by display_order */ public function scopeOrdered($query) { return $query->orderBy('display_order'); } }