28 lines
583 B
PHP
28 lines
583 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
use App\Models\Live\Viewer;
|
||
|
|
use App\Models\Server\MerchantUser;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class AccessRecord extends Model
|
||
|
|
{
|
||
|
|
//
|
||
|
|
protected $fillable = [];
|
||
|
|
protected $guarded = [];
|
||
|
|
|
||
|
|
public function viewer()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Viewer::class,'open_id','openid');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function mUser(){
|
||
|
|
return $this->belongsTo(MerchantUser::class,'open_id','openid');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function recommendUser()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(MerchantUser::class,'open_id','recommender');
|
||
|
|
}
|
||
|
|
}
|