'integer', 'expires_at' => 'datetime', 'downloads_total' => 'integer', 'storage_bytes' => 'integer', ]; public function user(): BelongsTo { return $this->belongsTo(User::class); } public function qrCode(): BelongsTo { return $this->belongsTo(QrCode::class); } public function files(): HasMany { return $this->hasMany(TransferFile::class); } public function downloadEvents(): HasMany { return $this->hasMany(TransferDownloadEvent::class); } public function isActive(): bool { if ($this->status !== self::STATUS_ACTIVE) { return false; } if ($this->expires_at && $this->expires_at->isPast()) { return false; } return true; } public function isPasswordProtected(): bool { return $this->password_hash !== null && $this->password_hash !== ''; } public function storageGb(): float { return round($this->storage_bytes / (1024 * 1024 * 1024), 3); } public function monthlyCostGhs(): float { return round($this->storageGb() * (float) config('transfer.price_per_gb_month', 0.30), 2); } }