mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
31 lines
462 B
PHP
31 lines
462 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Notification extends Model
|
|
{
|
|
|
|
public function actor()
|
|
{
|
|
return $this->belongsTo(Profile::class, 'actor_id', 'id');
|
|
}
|
|
|
|
public function profile()
|
|
{
|
|
return $this->belongsTo(Profile::class, 'profile_id', 'id');
|
|
}
|
|
|
|
public function item()
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
public function status()
|
|
{
|
|
return $this->belongsTo(Status::class, 'item_id', 'id');
|
|
}
|
|
|
|
}
|