51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\Server;
|
||
|
|
|
||
|
|
use App\Models\Consultation;
|
||
|
|
use App\Models\Course\Course;
|
||
|
|
use App\Models\MerchantShop;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
|
||
|
|
class CollageGroup extends Model
|
||
|
|
{
|
||
|
|
use SoftDeletes;
|
||
|
|
protected $fillable = [];
|
||
|
|
protected $guarded = [];
|
||
|
|
|
||
|
|
public function community()
|
||
|
|
{
|
||
|
|
return $this->hasOne(CommunityActivity::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
public function activity()
|
||
|
|
{
|
||
|
|
return $this->hasOne(CommunityActivity::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
public function service()
|
||
|
|
{
|
||
|
|
return $this->hasOne(CommunityActivity::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function shop()
|
||
|
|
{
|
||
|
|
return $this->hasOne(MerchantShop::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function course()
|
||
|
|
{
|
||
|
|
return $this->hasOne(Course::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function evaluate()
|
||
|
|
{
|
||
|
|
return $this->hasOne(MerchantEvaluate::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function consult()
|
||
|
|
{
|
||
|
|
return $this->hasOne(Consultation::class, 'id', 'type_id')->withTrashed();
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|