love_php/app/Models/Server/MerchantRecommendArea.php
2026-04-02 09:20:51 +08:00

46 lines
1.1 KiB
PHP

<?php
namespace App\Models\Server;
use App\Models\Consultation;
use App\Models\Course\Course;
use App\Models\MerchantShop;
use App\Models\QATest;
use App\Models\Server\CommunityActivity;
use Illuminate\Database\Eloquent\Model;
class MerchantRecommendArea extends Model
{
protected $guarded = [];
protected $fillable = [];
public function activty(){
return $this->hasOne(CommunityActivity::class, 'id', 'type_id')->where('class', 'one');
}
public function service(){
return $this->hasOne(CommunityActivity::class, 'id', 'type_id')->where('class', 'one');
}
public function consult(){
return $this->hasOne(Consultation::class, 'id', 'type_id');
}
public function course(){
return $this->hasOne(Course::class, 'id', 'type_id');
}
public function evaluate(){
return $this->hasOne(MerchantEvaluate::class, 'id', 'type_id');
}
public function shop(){
return $this->hasOne(MerchantShop::class, 'id', 'type_id');
}
public function test(){
return $this->hasOne(QATest::class, 'id', 'type_id');
}
}