23 lines
504 B
PHP
23 lines
504 B
PHP
<?php
|
|
|
|
namespace App\Models\Live;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ViewerShare extends Model
|
|
{
|
|
protected $table = 'viewer_share';
|
|
protected $guarded = [];
|
|
|
|
public function share(){
|
|
return $this->hasOne(Viewer::class,'id', 'viewer_id');
|
|
}
|
|
public function sharer(){
|
|
return $this->hasOne(Viewer::class,'id', 'sharer_id');
|
|
}
|
|
public function shareRoleViewer()
|
|
{
|
|
return $this->hasOne(ShareRoleViewer::class, 'viewer_id', 'viewer_id');
|
|
}
|
|
}
|