belongsTo(CoachUser::class, 'coach_id', 'id'); } /** * 获取从业资格证完整URL */ public function getQualPhotoUrlAttribute(): ?string { return $this->qual_photo ? "/api/download?filename={$this->qual_photo}&bucket=user-avatar" : null; } /** * 获取营业执照完整URL */ public function getBusinessLicenseUrlAttribute(): ?string { return $this->business_license ? "/api/download?filename={$this->business_license}&bucket=user-avatar" : null; } /** * 获取健康证完整URL */ public function getHealthCertificateUrlAttribute(): ?string { return $this->health_certificate ? "/api/download?filename={$this->health_certificate}&bucket=user-avatar" : null; } }