49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use App\Models\Base;
|
||
|
|
class UserPreview extends Base
|
||
|
|
{
|
||
|
|
protected $fillable = [];
|
||
|
|
protected $guarded = [];
|
||
|
|
|
||
|
|
public function user()
|
||
|
|
{
|
||
|
|
return $this->hasOne('App\Models\User', 'id', 'user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function previewUser()
|
||
|
|
{
|
||
|
|
return $this->hasOne('App\Models\User', 'id', 'preview_user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function profileCourtship()
|
||
|
|
{
|
||
|
|
return $this->hasOne(ProfileCourtship::class, 'user_id', 'preview_user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public function profileMarriage()
|
||
|
|
{
|
||
|
|
return $this->hasOne(ProfileCourtship::class, 'user_id', 'preview_user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function otherpreviewUser()
|
||
|
|
{
|
||
|
|
return $this->hasOne('App\Models\User', 'id', 'user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function otherProfileCourtship()
|
||
|
|
{
|
||
|
|
return $this->hasOne(ProfileCourtship::class, 'user_id', 'user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public function otherProfileMarriage()
|
||
|
|
{
|
||
|
|
return $this->hasOne(ProfileMarriage::class, 'user_id', 'user_id');
|
||
|
|
}
|
||
|
|
}
|