27 lines
477 B
PHP
27 lines
477 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use App\Models\Base;
|
||
|
|
class FellowingCard extends Base
|
||
|
|
{
|
||
|
|
protected $fillable = [];
|
||
|
|
protected $guarded = [];
|
||
|
|
|
||
|
|
public function user()
|
||
|
|
{
|
||
|
|
return $this->hasOne(User::class, 'id', 'user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function shareUser()
|
||
|
|
{
|
||
|
|
return $this->hasOne(User::class, 'id', 'share_user_id');
|
||
|
|
}
|
||
|
|
|
||
|
|
public function members()
|
||
|
|
{
|
||
|
|
return $this->hasMany(FellowingCardHistory::class, 'card_id', 'id');
|
||
|
|
}
|
||
|
|
}
|